...
After Configuring the Policy
The configuration will look like below.
Code Block |
---|
'policy' => { '1' => { IF => 'node.any and event.any', THEN => { '5' => { IF => 'event.event !~ "OPMANTEK-MIB"', THEN => 'script.send_snmptrap_poc()', BREAK => 'false' }, '10' => { IF => 'node.roleType eq "core" and event.event =~ "Down"', THEN => 'priority(+3)', BREAK => 'false' }, |
...
Testing opEvents Sending the TRAP
Installing the OPMANTEK-MIB
Copy the file OPMANTEK-MIB.mib to the target system which will be receiving the SNMP TRAPS. If this system is another vendors system, they will need to process the file into their system and confirm that it is done. To load it into an Opmantek VM copy the file to /usr/local/nmis8/mibs/traps and restart the SNMP Trap daemon "service snmptrapd restart".
Generate an Event in NMIS
The easiest way to generate an event in NMIS is to change a managed nodes host to an IP address which is unreachable and then restart the fpingd.pl.
Edit Nodes.nmis
Code Block |
---|
'host' => '1.2.3.4', |
Restart the fpingd.pl
In NMIS 8.5.6G fpingd.pl will detect the node change and reload the node list automatically, in earlier versions, you will need to restart fpingd.pl
Code Block |
---|
/usr/local/nmis8/bin/fpingd.pl restart=true |
Monitor opEvents GUI or Logs
Check the GUI or watch the logs
Code Block |
---|
tail -f /usr/local/omk/log/common.log |
Change the IP address back when your done.