View RSS Feed

jonwitts

Nagios

Rate this Entry
by , 13th November 2013 at 10:32 PM (5272 Views)
Quote Originally Posted by jonwitts View Post
I have just set up a few other checks on nagios for my SW box...

Using check_snmp and a custom command definition as follows:

Code:
define command{
        command_name    check_lin_load_snmp
        command_line    $USER1$/check_snmp -H $HOSTADDRESS$ -o 1.3.6.1.4.1.2021.10.1.3.$ARG1$ -C public -w $ARG2$ -c $ARG3$
        }
I have the defined the following service checks for CPU checking...

Code:
define service{
        use                     cpu-check-service,graphed-service
        host_name               fw-smoothwall
        service_description     CPU Load Average 1 min
        check_command           check_lin_load_snmp!1!4!8
        }

define service{
        use                     cpu-check-service,graphed-service
        host_name               fw-smoothwall
        service_description     CPU Load Average 5 min
        check_command           check_lin_load_snmp!2!2.8!5.6
        }

define service{
        use                     cpu-check-service,graphed-service
        host_name               fw-smoothwall
        service_description     CPU Load Average 15 min
        check_command           check_lin_load_snmp!3!2.8!5.6
        }
Disk checks and Swap memory checks are being performed with a plugin I added called "check_disk_snmp.pl" with a few minor mods from me to make it return performance data to our nagiosgraph install. You can get the plugin here: SNMP Check Disk - Nagios Exchange The commands for Disk and Swap checks are defined as follows:
Code:
# 'check_mem_snmp_cust' command definition
define command{
        command_name    check_mem_snmp_cust
        command_line    $USER1$/check_disk_snmp.pl -H $HOSTADDRESS$ -s public -d $ARG1$ -w $ARG2$ -c $ARG3$
        }

# 'check_disk_snmp_cust' command definition
define command{
        command_name    check_disk_snmp_cust
        command_line    $USER1$/check_disk_snmp.pl -H $HOSTADDRESS$ -s public -d $ARG1$ -w $ARG2$ -c $ARG3$
        }
and then the service checks are defined as follows:
Code:
define service{
        use                     memory-check-service,graphed-service
        host_name               fw-smoothwall
        service_description     Memory - Swap
        check_command           check_mem_snmp_cust!swap!75%!85%
        }

define service{
        use                     disk-check-service
        host_name               fw-smoothwall
        service_description     Disk Check - /
        check_command           check_disk_snmp_cust!/!85%!90%
        }

define service{
        use                     disk-check-service
        host_name               fw-smoothwall
        service_description     Disk Check - /var/log
        check_command           check_disk_snmp_cust!/var/log!85%!90%
        }
I have then just installed another plugin to report Real Memory usage and again modified it slightly to get the performance data looking the way I wanted. You can get this plugin here: http://www.be-root.com/downloads/nag...ck_snmp_memory

The command is defined as follows:
Code:
# 'check_snmp_memory' command definition
define command{
        command_name    check_snmp_memory
        command_line    $USER1$/check_snmp_memory -H $HOSTADDRESS$ -C public -w $ARG1$ -c $ARG2$
        }
and the service definition like this:
Code:
define service{
        use                     memory-check-service,graphed-service
        host_name               fw-smoothwall
        service_description     Memory - Real
        check_command           check_snmp_memory!80!90
        }
Hope this is of some help!

With NagiosGraph installed and the tweaks made for performance data we can get pretty graphs like this for our RAM, Swap, Disk and CPU usage for our Smoothwall! :-D

blogs/jonwitts/attachments/21503-nagios-showgraph.cgi.png
Categories
Uncategorized

Comments

Trackbacks

Total Trackbacks 0
Trackback URL: