Implementation of the Nagios performance analysis chart

Source: Internet
Author: User
Tags rrdtool

Ready: Nagios and existing monitoring services are installed.

Required Packages: rrd-tool-1.4.5.tar.gz

Pnp-0.4.13.tar.gz

This time, it's all on the service side .

: Http://pan.baidu.com/s/1i3h3Jk5

1. Installing PnP

1) Install RRDtool first

[Email protected] ~]# tar zxvf rrdtool-1.4.5.tar.gz

[Email protected] ~]# CD rrdtool-1.4.5

[Email protected] rrdtool-1.4.5]#/configure--prefix=/usr/local/rrdtool

[[email protected] rrdtool-1.4.5]# make && make install

2) re-install PnP

[Email protected] ~]# tar zxvf pnp-0.4.13.tar.gz

[Email protected] ~]# CD pnp-0.4.13

[[email protected] pnp-0.4.13]# make all

[[email protected] pnp-0.4.13]# make install

[email protected] pnp-0.4.13]# make Install-config

[email protected] pnp-0.4.13]# make Install-init

Installation complete, the PNP default file location prompt, also prompts rrds Perl Modules: * * * NOT FOUND * * *

Ignore it.

2. Configure PnP

1) Create a default configuration file

[Email protected] ~]# cd/usr/local/nagios/etc/pnp/

[email protected] pnp]# CP process_perfdata.cfg-sample PROCESS_PERFDATA.CFG

[email protected] pnp]# CP npcd.cfg-sample NPCD.CFG

[email protected] pnp]# CP rra.cfg-sample RRA.CFG

[Email protected] pnp]# chown-r nagios:nagios/usr/local/nagios/etc/pnp/

2) Modify the Process_perfdata.cfg file

[Email protected] pnp]# vim/usr/local/nagios/etc/pnp/process_perfdata.cfg

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/49/4C/wKiom1QSsInwC5lBAABX69BRbv4550.jpg "title=" Perfdata.png "alt=" Wkiom1qssinwc5lbaabx69brbv4550.jpg "/>

44 Change the log level here to 2, that is, debug mode

3. Modifying the Nagios configuration file

1) Modify Templates.cfg, add small sun icon

[Email protected] ~]# vim/usr/local/nagios/etc/objects/commands.cfg

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/4E/wKioL1QSsZODqgy7AADh_Ge_dmo255.jpg "title=" Xiaotaiyang.png "alt=" Wkiol1qsszodqgy7aadh_ge_dmo255.jpg "/>

Add 191-202 rows of content (recommended to be added at the end of the file)

2) Modify Nagios.cfg

[Email protected] ~]# vim/usr/local/nagios/etc/nagios.cfg

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/4C/wKiom1QSsiGznnDxAAEejkdGRLY289.jpg "title=" Nagios.png "alt=" Wkiom1qssigznndxaaeejkdgrly289.jpg "/>

833 0 to 1 (indicates that the data transfer function of Nagios is turned on)

845 Remove the previous comment

846 Remove the previous comment

3) Modify Commands.cfg

[Email protected] ~]# vim/usr/local/nagios/etc/objects/commands.cfg

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/4E/wKioL1QSsr2QHH-3AAEdqzw2-eA780.jpg "title=" Commands.png "alt=" Wkiol1qssr2qhh-3aaedqzw2-ea780.jpg "/>

Command_line Modify the back script to/usr/local/nagios/libexec/process_perfdata.pl

237 Command_line A back script for/usr/local/nagios/libexec/process_perfdata.pl

4) Modify Hosts.cfg

[Email protected] ~]# vim/usr/local/nagios/etc/objects/hosts.cfg

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/49/4E/wKioL1QSs4nwaLt_AAEx0bMub9E267.jpg "title=" Hosts.png "alt=" Wkiol1qss4nwalt_aaex0bmub9e267.jpg "/>

2 Add Hosts-pnp with "," separated after Linux-server

7 Add Hosts-pnp with "," separated after Linux-server

5) Modify Services.cfg

[Email protected] ~]# vim/usr/local/nagios/etc/objects/services.cfg

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/4C/wKiom1QStAHy0nzdAAJEUpETw6E754.jpg "title=" Services.png "alt=" Wkiom1qstahy0nzdaajeupetw6e754.jpg "/>

2 8 15 26 all Local-service after adding Services-pnp with "," separated

6) Modify function.inc.php

[Email protected] ~]# vim/usr/local/nagios/share/pnp/include/function.inc.php

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/49/4E/wKioL1QStc_jqY5WAACZjFRj8bM884.jpg "title=" 566. PNG "alt=" wkiol1qstc_jqy5waaczjfrj8bm884.jpg "/>

Add Data_default_timezone_set (' UTC ') to line 566

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/49/4E/wKioL1QStNjiVk9YAAB1y2rjjW0675.jpg "title=" Fun.png "alt=" Wkiol1qstnjivk9yaab1y2rjjw0675.jpg "/>

1502 Modify into

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/49/4C/wKiom1QStS6SxX69AABGl4JigeQ256.jpg "title=" 1026pdf.png "alt=" Wkiom1qsts6sxx69aabgl4jigeq256.jpg "/>

1027 Modifications ( & Delete in front of new)

Configuration is complete.

Restart Apache

Restart Nagios

If Nagios prompts for configuration errors, locate the wrong location with the following command and modify it appropriately

#/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/nagios.cfg

Then visit Http://192.168.5.203/nagios

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/49/4D/wKiom1QStnihXmsRAAHTMUIxSzs410.jpg "title=" wc.png "alt=" Wkiom1qstnihxmsraahtmuixszs410.jpg "/>

Click Mysql-ping's Little Sun

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/49/4E/wKioL1QSt3CzDCtzAALOl440lDk447.jpg "title=" Pingtu.png "alt=" wkiol1qst3czdctzaalol440ldk447.jpg "/> Summary, feel this is very suitable for monitoring memory usage, CPU usage, network card traffic, etc.

This article from "Dream Three" blog, declined reprint!

Implementation of the Nagios performance analysis chart

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.