snmp trap configuration for specific OIDs on remote device

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
joulsn
Posts: 19
Joined: Fri Nov 06, 2015 10:42 am

Re: snmp trap configuration for specific OIDs on remote devi

Post by joulsn »

rkennedy wrote:Thanks @rhassing!

OP let us know if this works.

Thank you. Unfortunately I was very busy this time. I will have a try next week.
BR ;)
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: snmp trap configuration for specific OIDs on remote devi

Post by rkennedy »

Sounds good - I'll leave this thread open for now. Let us know if you need further assistance!
Former Nagios Employee
joulsn
Posts: 19
Joined: Fri Nov 06, 2015 10:42 am

Re: snmp trap configuration for specific OIDs on remote devi

Post by joulsn »

rkennedy wrote:Sounds good - I'll leave this thread open for now. Let us know if you need further assistance!
good morning ;)
i had the chance to do the steps you suggested and thats the output:

[root@NagiosServer ~]# tail -f /var/log/messages
Mar 14 09:08:59 NagiosServer snmptrapd[1625]: 2016-03-14 09:08:59 <UNKNOWN> [UDP: [10.10.10.74]:10020->[10.10.10.50]]:#012.1.3.6.1.2.1.1.3.0 = Timeticks: (154205850) 17 days, 20:20:58.50#011.1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.33687.1.2.0.1#011.1.3.6.1.4.1.33687.1.1.3.1.0 = STRING: "MotionDetection"#011.1.3.6.1.4.1.33687.1.1.3.2.0 = INTEGER: 651225#011.1.3.6.1.4.1.33687.1.1.3.3.0 = INTEGER: 1457942591#011.1.3.6.1.4.1.33687.1.1.3.4.0 = INTEGER: 3#011.1.3.6.1.4.1.33687.1.1.3.5.0 = STRING: "CANON VB S30D"#011.1.3.6.1.4.1.33687.1.1.3.6.0 = INTEGER: 0#011.1.3.6.1.4.1.33687.1.1.3.7.0 = ""#011.1.3.6.1.4.1.33687.1.1.3.9.0 = STRING: "Motion event smd on camera CANON VB S30D [obelix] ()."

Mar 14 09:09:02 NagiosServer snmptrapd[1625]: 2016-03-14 09:09:02 <UNKNOWN> [UDP: [10.10.10.74]:10020->[10.10.10.50]]:#012.1.3.6.1.2.1.1.3.0 = Timeticks: (154206148) 17 days, 20:21:01.48#011.1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.33687.1.2.0.1#011.1.3.6.1.4.1.33687.1.1.3.1.0 = STRING: "MotionDetection"#011.1.3.6.1.4.1.33687.1.1.3.2.0 = INTEGER: 651229#011.1.3.6.1.4.1.33687.1.1.3.3.0 = INTEGER: 1457942594#011.1.3.6.1.4.1.33687.1.1.3.4.0 = INTEGER: 3#011.1.3.6.1.4.1.33687.1.1.3.5.0 = STRING: "CANON VB S30D"#011.1.3.6.1.4.1.33687.1.1.3.6.0 = INTEGER: 0#011.1.3.6.1.4.1.33687.1.1.3.7.0 = ""#011.1.3.6.1.4.1.33687.1.1.3.9.0 = STRING: "Motion event smd on camera CANON VB S30D [obelix] ()."

Mar 14 09:09:05 NagiosServer snmptrapd[1625]: 2016-03-14 09:09:05 <UNKNOWN> [UDP: [10.10.10.74]:10020->[10.10.10.50]]:#012.1.3.6.1.2.1.1.3.0 = Timeticks: (154206425) 17 days, 20:21:04.25#011.1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.33687.1.2.0.1#011.1.3.6.1.4.1.33687.1.1.3.1.0 = STRING: "MotionDetection"#011.1.3.6.1.4.1.33687.1.1.3.2.0 = INTEGER: 651233#011.1.3.6.1.4.1.33687.1.1.3.3.0 = INTEGER: 1457942597#011.1.3.6.1.4.1.33687.1.1.3.4.0 = INTEGER: 2#011.1.3.6.1.4.1.33687.1.1.3.5.0 = STRING: "axis 212"#011.1.3.6.1.4.1.33687.1.1.3.6.0 = INTEGER: 0#011.1.3.6.1.4.1.33687.1.1.3.7.0 = ""#011.1.3.6.1.4.1.33687.1.1.3.9.0 = STRING: "Motion event smd on camera axis 212 [obelix] ()."

Mar 14 09:09:05 NagiosServer snmptrapd[1625]: 2016-03-14 09:09:05 <UNKNOWN> [UDP: [10.10.10.74]:10020->[10.10.10.50]]:#012.1.3.6.1.2.1.1.3.0 = Timeticks: (154206451) 17 days, 20:21:04.51#011.1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.33687.1.2.0.1#011.1.3.6.1.4.1.33687.1.1.3.1.0 = STRING: "MotionDetection"#011.1.3.6.1.4.1.33687.1.1.3.2.0 = INTEGER: 651237#011.1.3.6.1.4.1.33687.1.1.3.3.0 = INTEGER: 1457942597#011.1.3.6.1.4.1.33687.1.1.3.4.0 = INTEGER: 3#011.1.3.6.1.4.1.33687.1.1.3.5.0 = STRING: "CANON VB S30D"#011.1.3.6.1.4.1.33687.1.1.3.6.0 = INTEGER: 0#011.1.3.6.1.4.1.33687.1.1.3.7.0 = ""#011.1.3.6.1.4.1.33687.1.1.3.9.0 = STRING: "Motion event smd on camera CANON VB S30D [obelix] ()."


[root@NagiosServer snmptt]# nano snmpttsystem.log
Mon Mar 14 08:59:37 2016 SNMPTT v1.4 shutdown
Mon Mar 14 08:59:37 2016 Total traps received=0,Total traps translated=0,Total traps ignored=0,Total unknown traps=0
Mon Mar 14 09:00:52 2016 SNMPTT v1.4 started
Mon Mar 14 09:00:52 2016 Could not open debug output file!
Mon Mar 14 09:00:52 2016 Loading /etc/snmp/snmptt.conf
Mon Mar 14 09:00:52 2016 Finished loading 104 lines from /etc/snmp/snmptt.conf
Mon Mar 14 09:00:52 2016 Could not convert user id 'snmptt' to a numeric UID

Mon Mar 14 09:02:08 2016 SNMPTT v1.4 started
Mon Mar 14 09:02:08 2016 Could not open debug output file!


BR guys ;)
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: snmp trap configuration for specific OIDs on remote devi

Post by rhassing »

Could you please check if the directory /var/log/snmptt/ exists?
And post the out put of:

Code: Select all

ls -ld /var/log/snmptt/
Rob Hassing
Image
joulsn
Posts: 19
Joined: Fri Nov 06, 2015 10:42 am

Re: snmp trap configuration for specific OIDs on remote devi

Post by joulsn »

rhassing wrote:Could you please check if the directory /var/log/snmptt/ exists?
And post the out put of:

Code: Select all

ls -ld /var/log/snmptt/
[root@NagiosServer ~]# ls -ld /var/log/snmptt/
drwxrwxr-x. 2 root root 4096 25. Feb 12:28 /var/log/snmptt/


/var/log/snmptt exists
it contains snmpttsystem.log
Fri Feb 26 16:17:41 2016 SNMPTT v1.4 shutdown
Fri Feb 26 16:17:41 2016 Total traps received=0,Total traps translated=0,Total traps ignored=0,Total unknown traps=0
Fri Feb 26 16:17:43 2016 SNMPTT v1.4 started
Fri Feb 26 16:17:43 2016 Loading /etc/snmp/snmptt.conf
Fri Feb 26 16:17:43 2016 Finished loading 104 lines from /etc/snmp/snmptt.conf
Fri Feb 26 16:17:43 2016 Could not convert user id 'snmptt' to a numeric UID

Mon Mar 14 08:54:06 2016 SNMPTT v1.4 shutdown
Mon Mar 14 08:54:06 2016 Total traps received=0,Total traps translated=0,Total traps ignored=0,Total unknown traps=0
Mon Mar 14 08:54:09 2016 SNMPTT v1.4 started
Mon Mar 14 08:54:09 2016 Could not open debug output file!
Mon Mar 14 08:54:09 2016 Loading /etc/snmp/snmptt.conf
Mon Mar 14 08:54:09 2016 Finished loading 104 lines from /etc/snmp/snmptt.conf
Mon Mar 14 08:54:09 2016 Could not convert user id 'snmptt' to a numeric UID

Mon Mar 14 08:57:19 2016 SNMPTT v1.4 shutdown
Mon Mar 14 08:57:19 2016 Total traps received=0,Total traps translated=0,Total traps ignored=0,Total unknown traps=0
Mon Mar 14 08:57:22 2016 SNMPTT v1.4 started
User avatar
rhassing
Posts: 416
Joined: Sat Oct 05, 2013 10:29 pm
Location: Netherlands

Re: snmp trap configuration for specific OIDs on remote devi

Post by rhassing »

You should either do:

Code: Select all

chmod 777 /var/log/snmptt/ 
Or you should make the process that runs snmptt (that's either snmptt or the process that runs snmptrapd) be the owner or change the group of this directory.
The error you get that the debug file could not be written does mean there is a permission error.

it looks good, so we should have you up and running in no time :-)
Rob Hassing
Image
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: snmp trap configuration for specific OIDs on remote devi

Post by rkennedy »

Thanks @rhassing!

@joulsn - let us know the result after changing the permissions.
Former Nagios Employee
Locked