Nagios Monitor Printer

Source: Internet
Author: User
Tags snmp

Nagios thinks its good stateful detection mechanism enables Nagios to monitor different plug-ins on different platforms, and it also supports the use of SNMP protocol (Simple Network Management Protocol) to monitor various platforms and devices. So Nagios can also use the SNMP protocol to monitor the printers in the LAN, and the Nagios Monitor printer uses the CHECK_HPJD tool to invoke the SNMP protocol to monitor the printer, which may not be in the Libexec plugin directory of the installed Nagios. Because the SNMP protocol dependent packages NET-SNMP and net-snmp-utils are not installed on the server, they can be installed directly with Yum or apt and then recompiled under Nagios-plugins. A little bit like Nagios without check_mysql when installing MySQL, the operation is as follows:

[[email protected] nagios-plugins-2.2.1]# yum-y install NET-SNMP net-snmp-utils[[email protected] nagios-plugins-2.2.1 ]#./configure--with-nagios-user=nagios--with-nagios-group=nagios[[email protected] nagios-plugins-2.2.1]# make && make Install

Now look at the Libexec plug-in directory there is a CHECK_HPJD plug-in, the printer monitoring way a bit similar to the Nagios monitoring Windows nsclient++, you can see http://jim123.blog.51cto.com/ 4763600/1956790, after Nagios is configured, there is a print configuration template that modifies the following template as in nsclient++:

/usr/local/nagios/etc/objects/printer.cfgdefine hostgroup{         hostgroup_name  network-printers        alias            Network Printers         }##################################################################################### ###        /usr/local/nagios/etc/servers/192.168.1.254.cfgdefine  host{        use              generic-printer         ; inherit  default values from a template        host_ name       hplj200                  ; the name we ' re giving to this printer         alias           HP  laserjet 200dn       ; a longer name associated  with the printer        address          192.168.1.254            ; IP address of the printer         hostgroups      network-printers         ; host groups this printer is associated with         contact_groups  admins        }define  service{        use                      generic-service          ; Inherit values from a template         host_name                hplj200                  ; 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        check_interval  10       ; Check the service every 10 minutes under normal  conditions        retry_interval  1        ; re-check the service every minute until its final/ Hard state is determined        max_check_attempts       2        notifications_enabled    1        }define service{         use                      generic-service        host_name                hplj200         service_description     PING         check_command           check_ping! 3000.0,80%!5000.0,100%        check_interval  10         retry_interval  1         max_check_attempts      2         notifications_enabled   1        }

After the configuration is restarted Nagios can realize the printer monitoring 650) this.width=650; "Src=" https://s4.51cto.com/wyfs02/M01/00/0F/ Wkiom1mvzoyi4kmqaaaau-pme94393.png-wh_500x0-wm_3-wmp_4-s_483796998.png "title=" printer "alt=" Wkiom1mvzoyi4kmqaaaau-pme94393.png-wh_50 "/>

This article from "Technical essay" blog, declined reprint!

Nagios Monitor Printer

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.