Hi Support,
I have tried to send a SNMP trap via command line, but my Nagios can't receive the trap. Is my command correct?
snmptrap -v 2c -c public 192.168.1.1 '' NAGIOS-NOTIFY-MIB::nSvcNotify nSvcOutput s "HI"
send SNMP trap via command
Re: send SNMP trap via command
Is SNMP trapping configured? Are you receiving other SNMP traps?
An easy set would be the following:
telnet 192.168.1.1 162
If you get a "Connection refused" message, then the trap receiver is not present. You can also use nmap to probe for the SNMP trap TCP port 162.
An easy set would be the following:
telnet 192.168.1.1 162
If you get a "Connection refused" message, then the trap receiver is not present. You can also use nmap to probe for the SNMP trap TCP port 162.
Re: send SNMP trap via command
Have you gone through this procedure on your Nagios XI server?
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: send SNMP trap via command
Hi All,
I did follow the tutorial to configure the snmp trap. I am trying to send a trap from remoter server(192.168.1.199) to my nagios server (192.168.1.199) via command line (snmptrap -v 2c -c public 192.168.1.199 '' NAGIOS-NOTIFY-MIB::nSvcNotify nSvcOutput s "HI"), and from the snmpttunknown.log I can see the trap is inside the log.
Tue Mar 10 20:51:29 2015: Unknown trap (.1.3.6.1.4.1.20006.1.8) received from 192.168.1.109 at:
Value 0: 192.168.1.109
Value 1: 192.168.1.109
Value 2: 4:6:49:24.57
Value 3: .1.3.6.1.4.1.20006.1.8
Value 4: 192.168.1.109
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
Ent Value 0: .1.3.6.1.4.1.20006.1.3.1.17=HI
How am I able to send a critical alarm via alarm, any idea?
I did follow the tutorial to configure the snmp trap. I am trying to send a trap from remoter server(192.168.1.199) to my nagios server (192.168.1.199) via command line (snmptrap -v 2c -c public 192.168.1.199 '' NAGIOS-NOTIFY-MIB::nSvcNotify nSvcOutput s "HI"), and from the snmpttunknown.log I can see the trap is inside the log.
Tue Mar 10 20:51:29 2015: Unknown trap (.1.3.6.1.4.1.20006.1.8) received from 192.168.1.109 at:
Value 0: 192.168.1.109
Value 1: 192.168.1.109
Value 2: 4:6:49:24.57
Value 3: .1.3.6.1.4.1.20006.1.8
Value 4: 192.168.1.109
Value 5:
Value 6:
Value 7:
Value 8:
Value 9:
Value 10:
Ent Value 0: .1.3.6.1.4.1.20006.1.3.1.17=HI
How am I able to send a critical alarm via alarm, any idea?
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: send SNMP trap via command
Did you read through the document tgriep linked to?
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
It outlines how to adjust severity for traps. Is that the information you're looking for?
http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
It outlines how to adjust severity for traps. Is that the information you're looking for?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: send SNMP trap via command
This gets kinda complicated.
You need to have an EVENT in your /etc/snmp/snmptt.conf or a trap processed mib file.
Have a read of this post to see if it helps at all.
http://support.nagios.com/forum/viewtop ... 81#p123119
You need to have an EVENT in your /etc/snmp/snmptt.conf or a trap processed mib file.
Have a read of this post to see if it helps at all.
http://support.nagios.com/forum/viewtop ... 81#p123119
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: send SNMP trap via command
Thanks guy! I have managed to receive the trap by adding in the EVENT inside snmptt.conf!
Re: send SNMP trap via command
I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee