User Tools

Site Tools


docs:tips_n_tricks:nagios:checks.html

Nagios Checks

check_most_disks

Checks als filesystems but one (or all matches of a regular expression)

define command{
      command_name    check_most_disks
      command_line    /usr/lib/nagios/plugins/check_disk -w '$ARG2$' -c '$ARG3$' -A -i '$ARG1$' -e
      }

To be referenced like this:

define service{
      use                             generic-service         ; Name of service template to use
      host_name                       localhost
      service_description             Disk Space
      check_command                   check_most_disks!/opt/bacula.*/working!20%!10%
      }

Will check all but /opt/bacula-<vers>/working with thresholds of 20% (WARN) and 10% (CRIT) free space left

check_regexp_disk

Checks one filesystem (or all matching a regular expression) with units fixed to megabytes

define command{
      command_name    check_regexp_disk
      command_line    /usr/lib/nagios/plugins/check_disk -u 'MB' -w '$ARG1$' -c '$ARG2$' -r '$ARG3$' 
      }

To be referenced like this:

define service{
      use                             generic-service         ; Name of service template to use
      host_name                       localhost
      service_description             /opt/bacula/working
      check_command                   check_regexp_disk!6000!4000!/opt/bacula.*/working
      }

Will check /opt/bacula-<vers>/working with thresholds of 6000MB (WARN) and 4000MB (CRIT) free space left.

Nagios Monitoring

docs/tips_n_tricks/nagios/checks.html.txt · Last modified: 22.10.2012 16:48 CEST by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki