BULK Trap and Service writing support
Posted: Tue Jan 19, 2021 11:00 am
Hello
I am inexperienced with Nagios and SNMP in general and want to know if the is a quicker more efficient way to go about writing traps / service for a project i'm working on.
i estimate i have approximately 800 - 1000 traps to define and then the corresponding services .
------ Outline of Project -----
I have 40 cameras being monitored by 5 Video servers (8 cameras per server)
Each camera has 10 different alarm conditions (PASSIVE TRAPS) - power - tamper - runtime - service interal etc
can be either in a CRITICAL or OK State
so currently i have 40x10x2 ==800 traps to write (the way that i'm currently writing them)
but the format i'm using is the same for the snmp trap ie the Object of the netSnmpExampleHeartbeatName string "SITE ID_FAULT_STATE" see below.
Passive traps for these cameras are generated by the Video Servers and not the cameras
So these passive traps sent by the servers contain camera identifiers so i cannot use IP addresses
so an example of a trap being sent is power failure at camera ABC
snmptrap -v 2c -c public 192.168.xxx.yyy '' netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatName s "ABC_POWER_CRITICAL."
and the reset trap is
snmptrap -v 2c -c public 192.162.xxx.yyy '' netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatName s "ABC_POWER_OK."
so currently i am defining the traps as per below --
example power fault reset at site ABC
*********Edit Trap Definition***************************
Trap Details
Event Name:ABC_POWER_OK
OID:netSnmpExampleHeartbeatNotification
Category:Alarm
Severity:Ok
Description:camera power alarm reset
-------
Passive Service Setup
These inputs will also work with the EXEC macros table.
Enable Passive Service Setup:
Host Name: camera ABC
Service Description:POWER ABC
Severity:OK
Service Output: power fault reset
--------
Exec:
--------
Advanced
MATCH $1: (.*ABC_POWER_OK.$)
********************************************************************
this way i calculate approx 1000 definition have to be written but is the an easier way
800 + 200 more for server traps video stream traps
Please any help will be GREATLY appreciated
Regards
Richie
I am inexperienced with Nagios and SNMP in general and want to know if the is a quicker more efficient way to go about writing traps / service for a project i'm working on.
i estimate i have approximately 800 - 1000 traps to define and then the corresponding services .
------ Outline of Project -----
I have 40 cameras being monitored by 5 Video servers (8 cameras per server)
Each camera has 10 different alarm conditions (PASSIVE TRAPS) - power - tamper - runtime - service interal etc
can be either in a CRITICAL or OK State
so currently i have 40x10x2 ==800 traps to write (the way that i'm currently writing them)
but the format i'm using is the same for the snmp trap ie the Object of the netSnmpExampleHeartbeatName string "SITE ID_FAULT_STATE" see below.
Passive traps for these cameras are generated by the Video Servers and not the cameras
So these passive traps sent by the servers contain camera identifiers so i cannot use IP addresses
so an example of a trap being sent is power failure at camera ABC
snmptrap -v 2c -c public 192.168.xxx.yyy '' netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatName s "ABC_POWER_CRITICAL."
and the reset trap is
snmptrap -v 2c -c public 192.162.xxx.yyy '' netSnmpExampleHeartbeatNotification netSnmpExampleHeartbeatName s "ABC_POWER_OK."
so currently i am defining the traps as per below --
example power fault reset at site ABC
*********Edit Trap Definition***************************
Trap Details
Event Name:ABC_POWER_OK
OID:netSnmpExampleHeartbeatNotification
Category:Alarm
Severity:Ok
Description:camera power alarm reset
-------
Passive Service Setup
These inputs will also work with the EXEC macros table.
Enable Passive Service Setup:
Host Name: camera ABC
Service Description:POWER ABC
Severity:OK
Service Output: power fault reset
--------
Exec:
--------
Advanced
MATCH $1: (.*ABC_POWER_OK.$)
********************************************************************
this way i calculate approx 1000 definition have to be written but is the an easier way
800 + 200 more for server traps video stream traps
Please any help will be GREATLY appreciated
Regards
Richie