Install and configure ZT in Nagios graphical Pnp (1)

Source: Internet
Author: User
Tags rrdtool

NagiosGraphicalPnpInstallation and configurationZTThe specific process is as follows:

(1) After nagios is installed, continue to install pnp. Pay attention to the installation of rrdtool. Tar-xvzf pnp-0.4.13.tar.gz

Cd pnp-0.4.13

./Configure

Make all

Make install

Make install-config

Make install-init

---------------------------------------------------------------------------------

FAQ:

*** Configuration summary for pnp 0.4.13 02-19-2009 ***

General Options:

--------------------------------------------

Nagios user/group: nagios

Install directory:/usr/local/nagios

HTML Dir:/usr/local/nagios/share/pnp

Config Dir:/usr/local/nagios/etc/pnp

Path to rrdtool:/usr/local/bin/rrdtool (Version 1.2.23)

RRDs Perl Modules: *** not found ***

RRD Files stored in:/usr/local/nagios/share/perfdata

Process_perfdata.pl Logfile:/usr/local/nagios/var/perfdata. log

Perfdata files (NPCD) stored in:/usr/local/nagios/var/spool/perfdata/

-----------------------------------------

Process_perfdata.pl installed in/usr/local/nagios/share/

Install the configuration sample file in/usr/local/nagios/libexecs

Config. php installed on/usr/local/nagios/etc/pnp

(2) modify the configuration file

Cd/usr/local/nagios/etc/pnp/

Cpprocess_perfdata.cfg-sample process_perfdata.cfg

Cp npcd. cfg-sample npcd. cfg

Cp rra. cfg-sample rra. cfg

Chown-R nagios: nagios *

Vi/usr/local/nagios/etc/pnp/process_perfdata.cfg

....

LOG_FILE =/usr/local/nagios/var/perfdata. log

#

# Loglevel 0 = silent 1 = normal 2 = debug

#

LOG_LEVEL = 2

# Change to 2 in debug mode.

Modify etc/objects/templates. cfg to add a new command (add a small Sun Flag)

# Add "host-pnp" after use to add a small Sun icon next to the host name on the Monitoring Chart. Click this icon to view the pnp image.

Define host {

Name host-pnp

Register 0

Action_url/nagios/pnp/index. php? Host = $ HOSTNAME $

Process_perf_data 1

}

# You can also add srv-pnp in the service column. After adding the srv-pnp, a small sun is added to the corresponding column.

Define service {

Name srv-pnp

Register 0

Action_url/nagios/pnp/index. php? Host = $ HOSTNAME $ & srv = $ SERVICEDESC $

Process_perf_data 1

}

Modify etc/nagios. cfg

Find the following items and remove the comments.

Process_performance_data = 1

Host_perfdata_command = process-host-perfdata

Service_perfdata_command = process-service-perfdata

Modify commands. cfg

# 'Process-host-perfdata' command definition

Define command {

Command_name process-host-perfdata

Command_line/usr/local/nagios/libexec/process_perfdata.pl

}

# 'Process-service-perfdata' command definition

Define command {

Command_name process-service-perfdata

Command_line/usr/local/nagios/libexec/process_perfdata.pl

}

⑥ The following configurations are required for nginx security issues:

Modify nginx. conf in the web server configuration file of pnp. Pay attention to security issues. I have not performed security verification here.

Location/pnp /{

Root/usr/local/nagios/share /;

Location ~ . * \. Php? $

{

# Fastcgi_pass unix:/tmp/php-cgi.sock;

Fastcgi_pass 127.0.0.1: 9000;

Fastcgi_index index. php;

Fcinclude gi. conf;

}

}

If open_basedir is enabled, You need to modify php. ini.

Open_basedir =

"/Opt/htdoc:/opt/php/lib/php:/tmp/session:/tmp/upload:/usr/local/nagios/share/pnp: /usr/local/nagios/etc/pnp:/usr/local/nagios/share/perfdata:/usr/local/rrdtool/bin/rrdtool


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.