Wednesday 13 July 2011

Nagios - Printer Checks


define host{
        use             generic-printer         ; Inherit default values from a template
        host_name       hplj2605dn              ; The name we're giving to this printer
        alias           HP LaserJet 2605dn      ; A longer name associated with the printer
        address         192.168.1.30            ; IP address of the printer
        hostgroups      network-printers        ; Host groups this printer is associated with
        }

# A hostgroup for network printers

define hostgroup{
        hostgroup_name  network-printers        ; The name of the hostgroup
        alias           Network Printers        ; Long name of the group
        }


define service{
        use                     generic-service         ; Inherit values from a template
        host_name               hplj2605dn              ; The name of the host the service is associated with
        service_description     Printer Status          ; The service description
        check_command           check_hpjd!-C public    ; The command used to monitor the service
        normal_check_interval   10      ; Check the service every 10 minutes under normal conditions
        retry_check_interval    1       ; Re-check the service every minute until its final/hard state is determined
        }


# Create a service for "pinging" the printer occassionally.  Useful for monitoring RTA, packet loss, etc.

define service{
        use                     generic-service
        host_name               hplj2605dn
        service_description     PING
        check_command           check_ping!3000.0,80%!5000.0,100%
        normal_check_interval   10
        retry_check_interval    1
        }


No comments:

Post a Comment