snmptt.conf reading

Information and discussions relating to the NSTI (Nagios SNMP Trap Interface) addon.

snmptt.conf reading

Postby floki » Thu Jan 10, 2019 11:55 pm

All right. So for example I got converted these MIB file to snmptt.conf.<device>
Code: Select all
#
#
#
#
MIB: IBM-SVC-MIB (file:/usr/share/snmp/mibs/SVC_MIB_7.8.1.MIB) converted on Thu Jan 10 17:03:18 2019 using snmpttconvertmib v1.4beta2
#
#
#
EVENT tsveETrap .1.3.6.1.4.1.2.6.190.1 "Status Events" Normal
FORMAT tsve error trap $*
SDESC
tsve error trap
Variables:
  1: tsveMACH
  2: tsveSERI
  3: tsveERRI
  4: tsveERRC
  5: tsveSWVE
  6: tsveFRUP
  7: tsveCLUS
  8: tsveNODE
  9: tsveERRS
  10: tsveTIME
  11: tsveOBJT
  12: tsveOBJI
  13: tsveADD1
  14: tsveADD2
  15: tsveCOPY
  16: tsveMPNO
  17: tsveOBJN
  18: tsveIDAL
EDESC
#
#
#
EVENT tsveWTrap .1.3.6.1.4.1.2.6.190.2 "Status Events" Normal
FORMAT tsve warning trap $*
SDESC
tsve warning trap
Variables:
  1: tsveMACH
  2: tsveSERI
  3: tsveERRI
  4: tsveERRC
  5: tsveSWVE
  6: tsveFRUP
  7: tsveCLUS
  8: tsveNODE
  9: tsveERRS
  10: tsveTIME
  11: tsveOBJT
  12: tsveOBJI
  13: tsveADD1
  14: tsveADD2
  15: tsveCOPY
  16: tsveMPNO
  17: tsveOBJN
  18: tsveIDAL
EDESC
#
#
#
EVENT tsveITrap .1.3.6.1.4.1.2.6.190.3 "Status Events" Normal
FORMAT tsve information trap $*
SDESC
tsve information trap
Variables:
  1: tsveMACH
  2: tsveSERI
  3: tsveERRI
  4: tsveERRC
  5: tsveSWVE
  6: tsveFRUP
  7: tsveCLUS
  8: tsveNODE
  9: tsveERRS
  10: tsveTIME
  11: tsveOBJT
  12: tsveOBJI
  13: tsveADD1
  14: tsveADD2
  15: tsveCOPY
  16: tsveMPNO
  17: tsveOBJN
  18: tsveIDAL
EDESC


Does that mean, I can only have three services configured with snmp trap to be monitored by nagios core?
floki
 
Posts: 65
Joined: Tue Dec 18, 2018 5:23 am

Re: snmptt.conf reading

Postby cdienger » Fri Jan 11, 2019 3:53 pm

Only these three OIDs will be recognized. You can certainly add more if you want.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 3149
Joined: Tue Feb 07, 2017 11:26 am

Re: snmptt.conf reading

Postby floki » Sat Jan 12, 2019 1:24 am

ohh so from what I understand. It means that the device can send out snmp trap that will not be recognized by snmptt because it's not included in the snmptt.conf.<device>? And the trap will be logged in to snmpttunknown log?
floki
 
Posts: 65
Joined: Tue Dec 18, 2018 5:23 am

Re: snmptt.conf reading

Postby floki » Sat Jan 12, 2019 9:33 am

hmmm after I looked into the nagios core GUI, I realized that I can actually use each variables listed in snmptt.conf.<device> and show each variable as a trap value. Like for example I can do this:

Code: Select all
#
#
#
EVENT tsveITrap .1.3.6.1.4.1.2.6.190.3 "Status Events" Normal
FORMAT tsve information trap $*
EXEC /usr/local/nagios/lib/eventhandlers/submit_check_results $r "Serv_Definition" 0 "tsve information trap $1"
SDESC
tsve information trap
Variables:
  1: tsveMACH
  2: tsveSERI
  3: tsveERRI
  4: tsveERRC
  5: tsveSWVE
  6: tsveFRUP
  7: tsveCLUS
  8: tsveNODE
  9: tsveERRS
  10: tsveTIME
  11: tsveOBJT
  12: tsveOBJI
  13: tsveADD1
  14: tsveADD2
  15: tsveCOPY
  16: tsveMPNO
  17: tsveOBJN
  18: tsveIDAL
EDESC


And then Create another trap
Code: Select all
#
#
#
EVENT tsveITrap .1.3.6.1.4.1.2.6.190.3 "Status Events" Normal
FORMAT tsve information trap $*
EXEC /usr/local/nagios/lib/eventhandlers/submit_check_results $r "Serv_Definition" 0 "tsve information trap $2"
SDESC
tsve information trap
Variables:
  1: tsveMACH
  2: tsveSERI
  3: tsveERRI
  4: tsveERRC
  5: tsveSWVE
  6: tsveFRUP
  7: tsveCLUS
  8: tsveNODE
  9: tsveERRS
  10: tsveTIME
  11: tsveOBJT
  12: tsveOBJI
  13: tsveADD1
  14: tsveADD2
  15: tsveCOPY
  16: tsveMPNO
  17: tsveOBJN
  18: tsveIDAL
EDESC
floki
 
Posts: 65
Joined: Tue Dec 18, 2018 5:23 am

Re: snmptt.conf reading

Postby cdienger » Mon Jan 14, 2019 5:23 pm

Be aware that all this would do is change the parameters that are passed to the submit_check_results script. If you wanted more control over when the script is executed based on what the variables hold then there is the MATCH config option.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
cdienger
Support Tech
 
Posts: 3149
Joined: Tue Feb 07, 2017 11:26 am


Return to Nagios SNMP Trap Interface

Who is online

Users browsing this forum: No registered users and 2 guests