Nagios Install Pnp4nagios Plugin

Source: Internet
Author: User
Tags rrdtool

Naigos Install Pnp4nagios Drawing Plugin

Original address: http://www.cnblogs.com/caoguo/p/5022230.html
[[Email protected]~]# Yum install-y rrdtool perl-rrdtool perl-time-Hires[[email protected] src]# wget http://nchc.dl.sourceforge.net/project/pnp4nagios/pnp-0.6/pnp4nagios-0.6.25.tar.gz[Email protected] src]# tar zxf pnp4nagios-0.6. -. tar.gz [[email protected] src]# CD Pnp4nagios-0.6. -[email protected] Pnp4nagios-0.6. -]# ./Configure--prefix=/usr/local/pnp4nagios--with-nagios-user=nagios--with-nagios-group=Nagcmd[[email protected] Pnp4nagios-0.6. -]# make All[[email protected] Pnp4nagios-0.6. -]# make Install[[email protected] Pnp4nagios-0.6. -]# make install-Webconf[[email protected] Pnp4nagios-0.6. -]# make install-config# Open log file [[email protected]~]# vi/usr/local/pnp4nagios/etc/Npcd.cfglog_type=file# start Pnp4nagios service #[[email protected]~]# Service npcd restart[[email protected]~]#/etc/init.d/npcd restart# Mouse hover icon display file [[email protected] Pnp4nagios-0.6. -]# CP Contrib/ssi/* /usr/local/nagios/share/ssi/[[email protected] ~]# chmod a+x/usr/local/nagios/share/ssi[[email  Protected] ~]# chown-r nagios.nagcmd/usr/local/nagios/share/ssi[[email protected] etc]# MV Misccommands.cfg-sample misccommands.cfg[[email protected] etc]# mv Rra.cfg-sample rra.cfg[[email  Protected] etc]# mv Nagios.cfg-sample nagios.cfg[[email protected] etc]# CD pages/[[email protected] pages]# MV Web_traffic.cfg-sample web_traffic.cfg[[email protected] pages]# CD. /check_commands/[[email protected] check_commands]# mv Check_all_local_disks.cfg-sample Check_all_local_ Disks.cfg[[email protected] check_commands]# mv Check_nrpe.cfg-sample check_nrpe.cfg[[email protected] check_commands]# mv check_nwstat.cfg-sample check_nwstat.cfg# Edit nagios configuration file [[email protected] ~]# vi/usr/local/ nagios/etc/nagios.cfgprocess_performance_data=1# * * * The template definition differs from the one in the original NAGIOS.C fg#service_perfdata_file=/usr/Local/pnp4nagios/var/service-perfdataservice_perfdata_file_template=datatype::serviceperfdata\ttimet:: $TIMET $\ Thostname:: $HOSTNAME $\tservicedesc:: $SERVICEDESC $\tserviceperfdata:: $SERVICEPERFDATA $\tservicecheckcommand::$ Servicecheckcommand$\thoststate:: $HOSTSTATE $\thoststatetype:: $HOSTSTATETYPE $\tservicestate:: $SERVICESTATE $\ Tservicestatetype:: $SERVICESTATETYPE $service_perfdata_file_mode=aservice_perfdata_file_processing_interval= 15service_perfdata_file_processing_command=process-service-perfdata-file# * * * The template definition differs from The one in the original nagios.cfg# #host_perfdata_file =/usr/local/pnp4nagios/var/host-perfdatahost_perfdata_file_ Template=datatype::hostperfdata\ttimet:: $TIMET $\thostname:: $HOSTNAME $\thostperfdata:: $HOSTPERFDATA $\ Thostcheckcommand:: $HOSTCHECKCOMMAND $\thoststate:: $HOSTSTATE $\thoststatetype:: $HOSTSTATETYPE $host_perfdata_ File_mode=ahost_perfdata_file_processing_interval=15host_perfdata_file_processing_command= Process-host-perfdata-file[[email proTected] ~]# cd/usr/local/nagios/etc/objects/[[email protected] objects]# CP commands.cfg commands.cfg.old# Configure command File # Bulk mode with NPCD mode [[email protected] objects]# vi commands.cfg# ' process-host-perfdata ' command definition# Note The default Process-host-perfdata and Process-service-perfdata, add the following define command{Command_name Process-service-perfdata-file command_line/bin/mv/usr/local/pnp4nagios/var/service-perfdata/usr/local/  Pnp4nagios/var/spool/service-perfdata. $TIMET $}define command{command_name process-host-perfdata-file command_line /bin/mv/usr/local/pnp4nagios/var/host-perfdata/usr/local/pnp4nagios/var/spool/host-perfdata. $TIMET $}# configuration template file [[ Email protected] objects]# VI templates.cfg define host {name Host-pnp action_url/pnp4nagios/     graph?host= $HOSTNAME $&srv=_host_ Register 0 process_perf_data 1} Define service {name Service-pnp  action_url/pnp4nagios/graph?host= $HOSTNAME $&srv= $SERVICEDESC $ register 0  Process_perf_data 1} # Configure localhost file, test pnp4naigos[[email protected] objects]# VI localhost.cfgdefine host{        Use Linux-server,host-pnp host_name localhost                             Alias localhost address 127.0.0.1}define service{use             Local-service,service-pnp host_name localhost service_description                             PING check_command check_ping!100.0,20%!500.0,60%}define service{use             Local-service,service-pnp host_name localhost service_description  Root Partition Check_command check_local_disk!20%!10%!/} [[email protected] ~]# cd/usr/local/pnp4nagios/share/[[email protected] share]# mv install.php install.php.bak[[email  Protected] ~]#/etc/init.d/nagios REstart[[email protected] ~]#/etc/init.d/npcd restart 

Nagios Install Pnp4nagios Plugin

Related Article

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.