Nagios Combined Pnp4nagios Chart

Source: Internet
Author: User

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/8A/A5/wKioL1g2n-3BqER8AAAyCX4HxhA208.png-wh_500x0-wm_3 -wmp_4-s_2144682402.png "title=" 6.png "alt=" Wkiol1g2n-3bqer8aaaycx4hxha208.png-wh_50 "/>


installationRRDtool

website:https://www.oetiker.ch/en/oss/projects/

Cd/usr/local/src

Wgethttp://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz

TAR-ZXVF rrdtool.tar.gz

CD rrdtool-1.4.9/

Yum install-y pango* #./configure -dependent packages

Yum install–y perl-extutils-cbuilderperl-extutils-makemaker #make needed Packages

./configure--prefix=/usr/local/rrdtool

Make

Make install

Note that nagios4.x and nagios3.x are compatible with Pnp4nagios.

installationPnp4nagios

Official website:http://www.pnp4nagios.org/

website:http://jaist.dl.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.25.tar.gz

cd/usr/local/src/

Wgethttp://jaist.dl.sourceforge.net/project/pnp4nagios/pnp-0.6/pnp4nagios-0.6.25.tar.gz

TAR-ZXVF pnp4nagios-0.6.25.tar.gz

CD pnp4nagios-0.6.25

Yum Install perl-time-hires #./configure required Packages

./configure–h # See where Pnp4nagios is installed by default

./configure--with-nagios-user=nagios--with-nagios-group=nagios--with-rrdtool=/usr/local/rrdtool/bin/ Rrdtool--with-perfdata-dir=/usr/local/nagios/share/perfdata

Make all

Make install

Make Install-config

Make Install-init

cd/usr/local/pnp4nagios/etc/

MV Misccommands.cfg-sample Misccommands.cfg

MV Nagios.cfg-sample Nagios.cfg

MV Rra.cfg-sample Rra.cfg

CD pages/

MV Web_traffic.cfg-sample Web_traffic.cfg

cd/usr/local/pnp4nagios/etc/check_commands/

MV Check_all_local_disks.cfg-samplecheck_all_local_disks.cfg

MV Check_nrpe.cfg-sample Check_nrpe.cfg

MV Check_nwstat.cfg-sample Check_nwstat.cfg

The Pnp4nagios model of This experiment is bulk with NPCD, and the related configuration is as follows

Vim/usr/local/nagios/etc/nagios.cfg

# Modify or Open

Process_performance_data=1

Host_perfdata_file=/usr/local/nagios/var/host-perfdata

Service_perfdata_file=/usr/local/nagios/var/service-perfdata

host_perfdata_file_template=[hostperfdata]\t$timet$\t$hostname$\t$hostexecutiontime$\t$hostoutput$\t$ hostperfdata$

Service_perfdata_file_template=[serviceperfdata]\t$timet$\t$hostname$\t$servicedesc$\t$serviceexecutiontime$\t $SERVICELATENCY $\t$serviceoutput$\t$serviceperfdata$

Host_perfdata_file_mode=a

Service_perfdata_file_mode=a

Host_perfdata_file_processing_interval=15

Service_perfdata_file_processing_interval=15

Host_perfdata_file_processing_command=process-host-perfdata-file

Service_perfdata_file_processing_command=process-service-perfdata-file

# process_performance_data=1 indicates that nagios performance data output is enabled

Vim/usr/local/nagios/etc/objects/commands.cfg

# put the original process-host-perfdata,process-service-perfdata notes, add

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 $

}

Vim/usr/local/nagios/etc/objects/templates.cfg

# Add

Define host {

Name Host-pnp

Register 0

action_url/pnp4nagios/share/index.php/graph?host= $HOSTNAME $&srv=_host_

Process_perf_data 1

}

Define Service {

Name Srv-pnp

Register 0

action_url/pnp4nagios/share/index.php/graph?host= $HOSTNAME $&srv= $SERVICEDESC $

Process_perf_data 1

}

# The Apache configuration file should be noted here , some to modify vim/usr/local/apache2/conf/httpd.conf

put DocumentRoot "/usr/local/apache2/htdocs" modified to documentroot "/usr/local"

Here's my other host, no change to apache2 config file

Define host {

Name Hosts-pnp

Register 0

action_url/nagios/pnp/index.php/graph?host= $HOSTNAME $&srv=_host_

Process_perf_data 1

}

Define Service {

Name Srv-pnp

Register 0

action_url/nagios/pnp/index.php/graph?host= $HOSTNAME $&srv= $SERVICEDESC $

Process_perf_data 1

}

Vim/usr/local/nagios/include/xiaojun.cfg

Define Host{

Use Linux-server,host-pnp

HOST_NAME 115.28.76.154

Alias 141

Address 115.28.76.154

}

Define Service{

Use Generic-service,srv-pnp

HOST_NAME 115.28.76.154

Service_description check_ping

Check_command check_ping!100.0,20%!200.0,50%

Max_check_attempts 5

Normal_check_interval 1

}

/etc/init.d/nagios start

/usr/local/apache2/bin/apachectl start

/ETC/INIT.D/NPCD start

# after startup, the pnp file of the corresponding host will be generated in/usr/local/nagios/share/perfdata

# Open the Japanese debug mode if it's wrong

Vim/usr/local/pnp4nagios/etc/process_perfdata.cfg

# Modify

Log_level = 2

/etc/init.d/nagios restart

Appear

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/A5/wKioL1g2oA-z-gvvAAAej7Vrutk232.png-wh_500x0-wm_3 -wmp_4-s_2086980589.png "title=" 7.png "alt=" Wkiol1g2oa-z-gvvaaaej7vrutk232.png-wh_50 "/>

Workaround:

Mv/usr/local/pnp4nagios/share/install.php/usr/local/pnp4nagios/share/install.php.bak


This article is from the "11736718" blog, please be sure to keep this source http://11746718.blog.51cto.com/11736718/1876227

Nagios Combined Pnp4nagios Chart

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.