Wednesday 15 May 2013

installing a new check into opsview

First check the opsview interface to see if the check is already installed.

If not check http://exchange.nagios.org/ or google search

Find a script that looks like it does the job with good ratings. Read the detail make sure there are no bugs affecting your software version / setup. If you can't find a script to do the job you will have to write one from scratch or use the default check_snmp script.

Open the script and get the OID's that they are using. Manual check them with snmpwalk, lets say my OID is "1.3.6.1.4.1.9.9.500.1.2.1.1.6"

snmpwalk -c public -v2c 192.168.0.1 1.3.6.1.4.1.9.9.500.1.2.1.1.6

Read the script see what the value that is returned means. If the script hasn't documented it, you have have to  get the vendors documentation or contact their support.

After testing with snmpwalk you can copy the script to the slave. You may have to "su - nagios" chown the script to nagios, chmod the script 755 and edit the !#/usr/bin/perl at the top of the script to the relevant path on your system.

Test the script by running it manually
./check_snmp_custom_check.pl -H 192.1680.1 -C public

If you are happy with the results you need to import the script into the master.

Copy the script to /usr/local/nagios/libexec
su / chown / chmod / edit #!
Go into the opsview web interface
Configuration -> Service checks
Click the Actions button -> create new service check

Fill in
Name
Description
Service group
Check period 24x7
You should be able to select the plugin check_snmp_custom_check.pl (if its not there try a reload)
Fill in the arguments "-H $HOSTADDRESS$ -C $SNMP_COMMUNITY$" view another check for help

Once complete reload opsview. Now try to add the check to a host (you may need another reload for it to appear).

Now the check should exist to be assigned to other hosts in the future.



No comments:

Post a Comment