Need help with an own created ow-server snmptt trap conf

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.
Locked
skyerjoe
Posts: 56
Joined: Thu Mar 22, 2012 2:57 am

Need help with an own created ow-server snmptt trap conf

Post by skyerjoe »

Hello everybody

We plan to integrate an Sensor in our IT Envirionment based on 1-wire sensors with an ow-server.

Unfortunatley the Company which has build the Ow-Server doesn't offer any traps in the MIB.

So i tried to create an MIB trap on myself

My reference is the Main Doku from snmptt

Here is the nagios trap log:

Code: Select all

trap.log:
 Mon Jul 9 11:28:33 2012: Unknown trap (.1.3.6.1.4.1.31440.0.6) received from 192.168.23.10 at:
Value 0: 192.168.23.10
Value 1: 192.168.23.10
Value 2: 115:5:24:30.31
Value 3: .1.3.6.1.4.1.31440.0.6
Value 4: 192.168.23.10
Value 5: public
Value 6: .1.3.6.1.4.1.31440
Value 7:
Value 8:
Value 9:
Value 10:
Ent Value 0: .1.3.6.1.4.1.31440.2.2.1.1.4=1


MonJul 9 11:31:25 2012: Unknown trap (.1.3.6.1.4.1.31440.0.6) received from 192.168.23.10 at:
Value 0: 192.168.23.10
Value 1: 192.168.23.10
Value 2: 121:10:59:44.32
Value 3: .1.3.6.1.4.1.31440.0.6
Value 4: 192.168.23.10
Value 5: public
Value 6: .1.3.6.1.4.1.31440
Value 7:
Value 8:
Value 9:
Value 10:
Ent Value 0: .1.3.6.1.4.1.31440.2.2.1.1.4=2

Here is the snmptt conf for the trap:

Event wateralertBOWSERVER .1.3.6.1.4.1.31440.0.6 "Status Events" Critical
FORMAT user intervention is needed
EXEC /usr/local/nagios/libexec/submit_check_result localhost "Water Alert" 2 "Water $3 "
MATCH $Ent Value 0: 1
Variables:
Value 0: 192.168.23.10
Value 1: 192.168.23.10
Value 2: 15:2:45:35.36
Value3: .1.3.6.1.4.1.31440.0.6
Value 4: 192.168.23.10
Value 5: public
Value 6: .1.3.6.1.4.1.31440
Value 7:
Value 8:
Value 9:
Value 10:
Ent Value 0: .1.3.6.1.4.1.31440.2.2.1.1.4=1
SDESC
ow-server alert
EDESC



Event wateralertAOWSERVER .1.3.6.1.4.1.31440.0.6 "Status Events" INFORMATIONAL
FORMAT all ok
EXEC /usr/local/nagios/libexec/submit_check_result localhost "Water Alert" 2 "Water $3 is ok"
MATCH $Ent Value 0: 2
Variables:
Value 0: 192.168.23.10
Value 1: 192.168.23.10
Value 2: 33:14:58:42.84
Value 3: .1.3.6.1.4.1.31440.0.6
Value 4: 192.168.23.10
Value 5: public
Value 6: .1.3.6.1.4.1.31440
Value 7:
Value 8:
Value 9:
Value 10:
Ent Value 0: .1.3.6.1.4.1.31440.2.2.1.1.4=2
SDESC
ow-server alert
EDESC

works:
- Other snmp traps which were generated by snmpttconvertmib and used with the snmp check result plugin


dosen't work:
- The own generated trap ( won't be recognised anymore the trap apperars in the unknown trap log all the time)


I think it has sth. to do with the match variable. But I'm not so familar with the perl syntax.

May someone could help me.


best regards john
Last edited by skyerjoe on Fri Aug 10, 2012 4:05 am, edited 1 time in total.
skyerjoe
Posts: 56
Joined: Thu Mar 22, 2012 2:57 am

Re: Need help with an own created ow-server snmptt trap con

Post by skyerjoe »

no one?

how i have to configure snmptt to identify this trap ...

edit: here is my snmptt.ini: http://pastebin.com/0akpvq1v
best regards skyerjoe
skyerjoe
Posts: 56
Joined: Thu Mar 22, 2012 2:57 am

Re: Need help with an own created ow-server snmptt trap con

Post by skyerjoe »

I have solved the problem.

First i modified the snmptt.config in a following way:

Code: Select all

EVENT wateralertOWSERVER .1.3.6.1.4.1.31440.0.6 "Status Events" Testing
FORMAT Water Status  
EXEC /usr/local/nagios/libexec/submit_check_result localhost "Water Alert level 1" 2  "Water status is $1-10 $+10-+10  " ( the dollar signs write in this way $1 $2 $3..etc $+1 $+2 ...etc) 
MATCH $+1:(31440.2.2.1.1.4:2)
SDESC
ow-server alert
EDESC
now i can see in the plugin output which Variable defines which Value
so now i can build the final trap:

Code: Select all

[code]EVENT wateralertOWSERVER .1.3.6.1.4.1.31440.0.6 "Status Events" Testing
FORMAT Water Status $+1
EXEC /usr/local/nagios/libexec/submit_check_result localhost "Water Alert level 1" 2  "Water status is  critical"
MATCH $+1:(31440.2.2.1.1.4:2)
SDESC
ow-server alert
EDESC



EVENT wateralertOWSERVER .1.3.6.1.4.1.31440.0.6 "Status Events" Testing
FORMAT Water Status $+1
EXEC /usr/local/nagios/libexec/submit_check_result localhost "Water Alert level 1" 0 "Water status is ok"
MATCH $+1:(31440.2.2.1.1.4:1)
SDESC
ow-server alert
EDESC
Maybe there are some other Alternatives to determine all Varaibles and their Values .... but i only found this solution


best regards skyerjoe
Locked