Handy Nagios checks
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README
check_snmp_status
check_snmp_vif_list
check_xen_domain_host
check_xen_domain_shell_user
check_xen_shell_ldap_entry

README

Xeriom Nagios Checks
====================

Checks that I couldn't find elsewhere and I ended up writing.

Check SNMP
----------

There are a lot of SNMP checks... but all of the ones I could find assume
that the configuration for critical / warning values will be done on the
monitoring host. I don't want to change the Nagios configuration every time
a client re-evaluates their monitoring requirements - let's give them control.

check_snmp_status takes three arguments: the hostname, the OID to look for a
one-line summary and the OID to look for the status code. It queries the
public (SNMPv1) community for the OIDs and passes the values straight back to
Nagios.

Here's how I use it to monitor my hosts in conjunction with the SNMP Agent for
mounts (available here: http://github.com/craigw/xeriom-nagios-snmp-agents).

    define command {
      command_name    check_snmp_status
      command_line    /usr/lib/xeriom-nagios-checks/check_snmp_status $HOSTADDRESS$ $ARG1$ $ARG2$
    }

    define service {
      hostgroup_name            xeriom_networks-hosts
      service_description       MOUNT /
      check_command             check_snmp_status!.1.3.6.1.4.1.32919.4.1.1.1.1.1.7!.1.3.6.1.4.1.32919.4.1.1.1.1.1.8
      use                       generic-service
      notification_interval     0 ; set > 0 if you want to be renotified
      contact_groups            admins,xeriom_irc
    }


Check Xen Domain Host
---------------------

It can be pretty easy to lose track of the host that a domU is running on if
it's moved around a few times - especially when you're looking after many
hundreds of domUs.

check_xen_domain_host takes one argument: the host that the domain /should/
be running on.

Here's how I use it in conjunction with the SNMP Agent for Xen Store
(available here: http://github.com/craigw/xeriom-nagios-snmp-agents).

    define command {
      command_name    check_xen_domain_host
      command_line    /usr/lib/xeriom-nagios-checks/check_xen_domain_host $ARG1$ $HOSTNAME$.vm.xeriom.net
    }

    define service {
      hostgroup_name            xeriom-vm-host-NN6-virtual_machines
      service_description       PHYSICAL HOST
      check_command             check_xen_domain_host!xeriom-vm-host-NN.core.xeriom.net
      use                       generic-service
      notification_interval     0 ; set > 0 if you want to be renotified
      contact_groups            admins,xeriom_irc
    }

Check Xen Domain Shell User
---------------------------

Check that a user can access the Xen Shell for a particular VM.

check_xen_domain_host takes three arguments: the host that the domain is
running on, the name of the domain, and the username that should be able to
access the Xen Shell.

Here's how I use it in conjunction with the SNMP Agent for Xen Configuation
(available here: http://github.com/craigw/xeriom-nagios-snmp-agents).

    define command {
      command_name    check_xen_domain_shell_user
      command_line    /usr/lib/xeriom-nagios-checks/check_xen_domain_shell_user $ARG1$ $HOSTNAME$.vm.xeriom.net $ARG2$
    }

    define service {
      hostgroup_name            host-VM_NAME
      service_description       ADMIN SHELL USER
      check_command             check_xen_domain_shell_user!xeriom-vm-host-NN.core.xeriom.net!USERNAME
      use                       generic-service
      notification_interval     0 ; set > 0 if you want to be renotified
      contact_groups            admins,xeriom_irc
    }

Authors
-------

Written by Craig R Webster <http://barkingiguana.com/~craig>