General
cancel
Showing results for 
Search instead for 
Did you mean: 

SNMP Traps to local host on a port different that 162

KhalidRoamware
Occasional Visitor

SNMP Traps to local host on a port different that 162

Hi

We are having HP Proliant DL580 and 380 Servers with Solaris OS , we need to configure the snmp traps of hardware issues to be sent to a specific host and port (not 162 ) , and i am not sure what is the config file to change to achieve this

5 REPLIES
Johan Guldmyr
Honored Contributor

Re: SNMP Traps to local host on a port different that 162

Hey, which SNMPd are you using (snmpd, net-snmp)? Which Solaris Version?
Have you tried looking in the manual for it?

I am no Solaris expert, but are you sure it's in the snmp config? Maybe there is some other functionality on the solaris where you control daemons and their ports?

Or are the snmp-traps coming from something in the Proliant Support Pack?
KhalidRoamware
Occasional Visitor

Re: SNMP Traps to local host on a port different that 162

Hi

It is Solaris 10

I am not sure which snmp is running , but seems it is the NET-SNMP (i can see the snmpdx is reading the snmp.conf from /etc/snmp/conf

Viktor Balogh
Honored Contributor

Re: SNMP Traps to local host on a port different that 162

>> Servers with Solaris OS
> It is Solaris 10

yepp. and this is a forum for general linux-related questions. Maybe post your question to an oracle forum.

And to try to answer your question, I think that you should poke with svcs/svcadm to change the default port..

See the FMRI /application/management/snmpdx ...

****
Unix operates with beer.
Viktor Balogh
Honored Contributor

Re: SNMP Traps to local host on a port different that 162

from man snmpdx:

-pport Specify the port number. The default
port number is 161.

But dunno where is it configured.
****
Unix operates with beer.
Matti_Kurkela
Honored Contributor

Re: SNMP Traps to local host on a port different that 162

If I understood correctly, the original post is about the destination port number of _outgoing_ SNMP traps.

If Solaris 10 uses NET-SNMP, the trap destination should be defined in the snmp.conf file using either "trapsink" or "trap2sink" keyword (for SNMP v1 or v2c traps, respectively).

According to NET-SNMP documentation, the trapsink keywords accept "NET-SNMP transport specifications", i.e. if you want to send to a non-default port, just add a colon and the desired port number after the target IP address/hostname.

Here's an example for sending SNMP version 2c traps to trapdestination.example using port 666:

trap2sink trapdestination.example:666

There's also an older (now deprecated) syntax, which requires you to also specify the trap community name on the trapsink/trap2sink line.

Here's an equivalent example using the older syntax and trap community name "SecretTrapCmName":

trap2sink trapdestination.example SecretTrapCmName 666


In Proliant hardware, the iLO remote management system may also be capable of sending SNMP traps, depending on the iLO version your hardware is equipped with. This feature is completely OS-independent. If your server has an iLO with SNMP functionality, it can be configured through iLO web interface. I'm not sure if iLO can send traps to a non-default port at all; if there is no way to set the port number using the web GUI,

MK
MK