Daily management and maintenance of Nagios

Source: Internet
Author: User
Tags apache php config ftp log php and rrdtool install perl

1, verify the correctness of the Nagios configuration file

Nagios to verify the configuration file in the very place, simply through a command to complete:/usr/local/nagios/bin/nagios-v/usr/local/nagios/etc/ Nagios.cfgnagios provides this validation feature, which usually prints out the wrong profile and which line in the file, which makes the Nagios configuration very easy, and the alert information is usually negligible because it is generally only recommended.

2, start and stop Nagios

(1) Boot Nagiosü start Nagios/etc/init.d/nagios start or service Nagios startü manually by initializing the script Nagios via Nagios command "D" parameter to start the Nagios daemon:/usr/local/nagios/bin/nagios-d/usr/local/nagios/etc/nagios.cfg

(2) Close Nagiosü Nagios Services/etc/init.d/nagios stop or service Nagios Stopü by initializing a script to shut down Nagioskill by means of kill <nagios_pid>

(3) Reboot the Nagiosü reboot the Nagios/etc/rc.d/init.d/nagios reload/etc/rc.d/init.d/nagios restartü the Web monitor page to reboot by initializing the script Nagios

3.nagios Performance Analysis Chart

(1) Nagios Performance Analysis chart role nagios to the service or host monitoring is a transient state, sometimes the system administrator if need to understand the host for a period of time performance and service response status, and the formation of a chart, you need to view the log data to analyze, but this way not only cumbersome, and abstract, but luckily, PnP can help us to do the job.

(2) The concept of PNP and the installation Environment PnP is a small open source package that is based on PHP and PERL,PNP can use the RRDtool tool to draw the data collected by Nagios into related charts, and then show how the host or service is running over a period of time. PNP Official website: http://www.pnp4nagios.org If you want to install PNP, you first need to install the following environment: 1: After the integration of the Apache PHP environment, you need to support GDZLIBJPEG2: Install RRDtool Tool 3: Install Perl

RRDtool is a graph generation tool that can get information from http://www.mrtg.org/rrdtool/. The version downloaded here is rrdtool-1.4.5.tar.gz,

The installation process is as follows:

[Root@nagios rrdtool]# tar zxvf rrdtool-1.4.5.tar.gz

[Root@nagios rrdtool]# CD rrdtool-1.4.5

[Root@nagios rrdtool-1.4.5]#./configure--perfix=/usr/local/rrdtool

[Root@nagios rrdtool-1.4.5]# make

[Root@nagios rrdtool-1.4.5]# make install

Configuration times error:./configure--prefix=/usr/local/rrdtool

Configure:warning:
----------------------------------------------------------------------------
* I could not find a working copy of glib-2.0. Check Config.log for hints on why
This is the case. Maybe you need to set ldflags and cppflags appropriately
So, compiler and the linker can find libglib-2.0 and its header files. If
You are have not installed glib-2.0, and you can get it either from its original home on

ftp://ftp.gtk.org/pub/glib/2.12/

Can find also find a archive copy on

Http://oss.oetiker.ch/rrdtool/pub/libs

The last tested version of glib-2.0 is 2.12.12.

Libs=-lm-lwrap
ldflags=
cppflags=

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

Checking for pango_cairo_context_set_font_options in-lpangocairo-1.0 ... no
Checking for pkg-config ... (cached) Pkg-config
Configure:warning:
----------------------------------------------------------------------------
* I found a copy of Pkgconfig, but there is no pangocairo.pc file around.
The May want to set the Pkg_config_path variable to
Location.
----------------------------------------------------------------------------

Configure:warning:
----------------------------------------------------------------------------
* I could not find a working copy of Pangocairo. Check Config.log for hints on why
This is the case. Maybe you need to set ldflags and cppflags appropriately
So, compiler and the linker can find libpangocairo-1.0 and its header files. If
You are have not installed Pangocairo, and you can get it either from its original home on

http://ftp.gnome.org/pub/GNOME/sources/pango/1.17

Can find also find a archive copy on

Http://oss.oetiker.ch/rrdtool/pub/libs

The last tested version of Pangocairo is 1.17.

Libs=-lm-lwrap
ldflags=
cppflags=

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

Checking for Xmlparsefile in-lxml2 ... yes
Checking libxml/parser.h usability ... yes.
Checking Libxml/parser.h presence ... yes.
Checking for libxml/parser.h ... yes
Configure:error:Please The fix the library issues listed above and try again.

The solution is:

Yum install-y glib libpng pixman pango-devel

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.