centos7.3 fast installation of Pnp4nagios graphic display

Source: Internet
Author: User

Before the summer, please see my previous quick installation of the Nagios article.


are monitoring the server-side installation configuration:

Graphics Dependent Libraries

#yum install Cairo Pango zlib zlib-devel freetype freetype-devel gd gd-devel

Rrdtools relies on the use of paint.

#yum Install LIBART_LGPL RRDtool

Pnp4nagios lead, collect data, display graphics

#yum Install Pnp4nagios

Change the display time, or there will be a 8-hour jet lag

#vi/etc/php.inidate.timezone = "Asia/shanghai"
#vi/etc/pnp4nagios/config.php$conf[' date_fmt '] = "Y.M.D h:i"; More in line with Chinese time habits

Configuring the plot because Pnp4nagios 0.6 is configured to use BULK+NPCD mode,

Official website Description Https://docs.pnp4nagios.org/pnp-0.6/config#bulk_mode

#vi  /etc/nagios/nagios.cfgprocess_performance_data=1host_perfdata_file=/var/spool/pnp4nagios/ Host-perfdataservice_perfdata_file=/var/spool/pnp4nagios/service-perfdatahost_perfdata_file_template=datatype: : Hostperfdata\ttimet:: $TIMET $\thostname:: $HOSTNAME $\thostperfdata:: $HOSTPERFDATA $\thostcheckcommand::$ Hostcheckcommand$\thoststate:: $HOSTSTATE $\thoststatetype:: $HOSTSTATETYPE $service_perfdata_file_template= Datatype::serviceperfdata\ttimet:: $TIMET $\thostname:: $HOSTNAME $\tservicedesc:: $SERVICEDESC $\tserviceperfdata:: $SERVICEPERFDATA $\tservicecheckcommand:: $SERVICECHECKCOMMAND $\thoststate:: $HOSTSTATE $\thoststatetype::$ Hoststatetype$\tservicestate:: $SERVICESTATE $\tservicestatetype:: $SERVICESTATETYPE $host_perfdata_file_mode= Aservice_perfdata_file_mode=ahost_perfdata_file_processing_interval=15service_perfdata_file_processing_ Interval=15host_perfdata_file_processing_command=process-host-perfdata-fileservice_perfdata_file_processing_ Command=process-service-perfdata-file

Modify the COMMAND.CFG definition

#vi/etc/nagios/objects/command.cfg# ' process-host-perfdata ' command definition define command{command_name PR Ocess-host-perfdata-file command_line/usr/libexec/pnp4nagios/process_perfdata.pl--bulk=/var/lib/pnp4nagios/ho St-perfdata}# ' process-service-perfdata ' command definition define command{command_name PROCESS-SERVICE-PERFD Ata-file command_line/usr/libexec/pnp4nagios/process_perfdata.pl--bulk=/var/lib/pnp4nagios/service-perfdata}

modifying template definitions

#vi/etc/nagios/objects/templates.cfgdefine host{name Host-pnp action_url/pnp4nagios/graph?host= $HOSTNAME $ &srv=_host_ Register 0}define service{name Service-pnp action_url/pnp4nagios/graph?host = $HOSTNAME $&srv= $SERVICEDESC $ register 0}

Modifying the host, service detection configuration file

#vi/etc/nagios/objects/hosts.cfg. Use LINUX-SERVER,HOST-PNP//Add Host-pnp template ... #vi/etc/nagios/objects/servi Ces.cfg. Use GENERIC-SERVICE,SERVICE-PNP//Add Service-pnp Template ...
#nagios-V/etc/nagios/nagios.cfg detect the configuration is correct
#systemctl Restart Npcd#systemctl Restart Httpd#systemctl restart Nagios


Click on the small icon, you can open the graphical monitoring page.


650) this.width=650; "src=" https://s1.51cto.com/wyfs02/M00/91/27/wKioL1j0XCygm-MfAABTSWmnKrE822.jpg "title=" 2.jpg "alt=" Wkiol1j0xcygm-mfaabtswmnkre822.jpg "/>


650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/91/28/wKiom1j0WwCSHwZ4AAFGt-bp72g538.jpg-wh_500x0-wm_ 3-wmp_4-s_4217741059.jpg "title=" 1.jpg "alt=" Wkiom1j0wwcshwz4aafgt-bp72g538.jpg-wh_50 "/>

This article comes from the "Endless Struggle for Life" blog, please be sure to keep this source http://shenfly231.blog.51cto.com/12811004/1916651

centos7.3 fast installation of Pnp4nagios graphic display

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.