Nagios Deployment Configuration ProcessNagios Service side:1. Deploy Nagios Server (refer to Nagios official deployment documentation), Nagios-plugin, PHP, apache22, need to add/etc/hosts in the service side of the resolution3. Configuration file DescriptionConfigure the host directory to be monitored in nagios.cfg dir
With more than one NAT environment in the recent project, it is not very convenient to notify contact management if it is not ideal to deploy a complete set of Nagios (Nagios-core+apache+php+pnp4nagios) in each NAT, Then we'll start deploying Nagios distributed monitoring together.
Main Nagios Center Service deploymen
nrpe. cfg
[Root @ localhost etc] # vi nrpe. cfg
Command [check_postfix] =/usr/local/nagios/libexec/check_queue/tmp/que
Configure the configuration file of the nagios server Mail Host:
[Root @ localhost objects] # vi mail. cfg
Define service {
Use local-service; Name of service template to use
Host_name mail_h
grep'Echo "Process of './DFS Client' OK! -Parent process is 'echo $ dfs_pprocess | awk '{print $8, $9, $10 }''"Exit 0
Fi
Then open the configuration file of the monitored nrpe.
# Vi/usr/local/Nagios/etc/nrpe. cfg
Add:
Command [check_dfs] =/usr/local/Nagios/libexec/check_dfs.sh
You can customize the Monitoring Servic
problems was encountered while processing the config files... Check your configuration file(s) to ensure that they contain valid directives and data defintions. If you are upgrading from a previous version of Nagios, you should be aware that some variables/definitions may have been removed or modified in this version. Make sure to read the HTML documentation regarding the config files, as well as the 'Whats New' section to f
between the following #
######################################## ##################
#! /Bin/sh
######### Check_cputemp ###########
# Date: May 1, 2011
# Licence GPLv2
# INSTALLATION
# The script need to install lm_sensors
# Sensors's output need like below format
######################################## #
# Coretemp-isa-0000 #
# Adapter: ISA adapter #
# Core 0: + 27 °C (high = + 85 °C )#
#
# Coretemp-isa-0001 #
# Adapter: ISA adapter #
# Core 1: + 25 °C (high = + 85 °C )#
######################
here is a simple demonstration of how nagios can be used to customize the system for monitoring under Linux systems. Nagios's monitoring process in Linux uses the Nrpe client to invoke scripts in the/usr/lib64/nagios/plugins/directory and then returns the retrieved data to Nagios, which returns different status values
First, install the NrpeThis department uses the direct decompression method to install the NrpeSecond, configure the Nrpe service1. Modify the check_oracle in the Libexec folderAdd the following items in itOracle_home=/oradata/oracle/product/11.2.0path= $PATH:/oradata/oracle/product/11.2.0/bin2. Add the following items in the nrpe.confCommand[check_oracle_tablespace]=/usr/local/nagios/libexec/check_oracle--
1. Nagios's master configuration fileNagios's main configuration file is Nagios.cfg, whose syntax is very concise, usually # begins with the behavior Comment line, and the parameter is formatted as Log_file: Set the Nagios log file;The Cfg_file:nagios object defines the relevant file, which can be reused multiple times to specify multiple files;Cfg_dir: Sets the directory where the relevant files for the Nagios
1. Install the required componentsYum Install Perl perl-devel perl-cpan BC SNMPD-YPerl-mcpan-eshell cpan> Install BUNDLE::LWPCompile and install Nrpe (refer to Tutorial:http://2860664.blog.51cto.com/2850664/1559056)The following are the monitored side settings2. Download check_nginx_status.pl Script: Https://github.com/cloved/check_traffic/archive/v1.3.11.zipAfter extracting the files, upload check_traffic.sh to/usr/local/
nagios requires the monitored side to send data to the Nagios side in the agreed format. Monitoring includes 2 types of nodes and services. The node Monitoring convention data format is as follows:[The format is easy to understand, data commit timestamp, monitored node name, node State (up/down/unrearchable), plugin custom extra data. The state-specific explanations for each field are as follows:1. Timestam
PNP is a small open-source software package. It is based on PHP and PERL and uses rrdtool to plot data collected by Nagios into charts. If you want to install Nagios pnp, the detailed Nagios pnp configuration is provided here for you to refer to the configuration of Nagios pnp after installing all the software.
1. Mod
determine who the murderer (the program is making) is, and for further processing.2. After saving, modify the permissions of the scriptchmod +x/usr/lib/nagios/plugins/check_disk.sh (on client)3. Then edit the/etc/nagios/nrpe.cfg fileVIM/ETC/NAGIOS/NRPE.CFG # Add a line: (on client)command[check_disk]=/usr/lib/nagios/p
/nrpe.cfg fileVim/etc/nagios/nrpe.cfg # Add a line: (on client)command[check_disk]=/usr/lib/nagios/plugins/check_disk.shSave, restart Nrpe service/etc/init.d/nrpe Restart (on client)on the server side operation:4. The way to detect if the script is working correctly is to execute the following command to the server sid
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.