Before we write the monitoring plug-in, we first need to have some idea of the Nagios monitoring principle.Nagios's function is to monitor the service and host, but he does not include this part of the function, all the monitoring, detection functions are through a variety of plug-ins to complete.When
I. Custom Nagios monitoring scripts1. Create a script on the client/usr/local/nagios/libexec/check_disk.shVim/usr/local/nagios/libexec/check_disk.sh writes the following: (On the client)#!/bin/bashrow= ' df-h |wc-l ' #输出的总行数For i in ' seq 2 $row ' #从第二行开始为真实的磁盘 because the first behavior header informationDoAva= ' df-h
Create a script on the client/usr/lib/nagios/plugins/check_disk.sh//yum installation of Nagios, if you are compiling the default script file directory for your own installation in a custom installed Nagios directoryTo operate on the client:vim/usr/lib/nagios/plugins/check_disk.sh writes the following://This is a disk s
/init.d/nrpe restartService side5. Check if the script is running correctly[email protected] ~]#/usr/lib64/nagios/plugins/check_nrpe-h 192.168.219.128-c check_disk/OK 26% 13g/dev/shm ok 0% 242m/boot OK 8% 426MExplanatory notes:If normal, it will output a row of disk detection data, or may be error.# # # # #错误 #####[Email protected] ~]#/usr/lib64/nagios/plugins/check_nrpe-h 192.168.153.129-c check_diskNrpe:u
/Run/user/1000/gvfs is not accessible Nagios monitoring
Install nagios3.5.1 in Ubuntu 14.04 and use the local machine as the server. After/etc/init. d/nagios3 start, a red warning is displayed on the web interface, as shown below:
Disk critial-/run/user/1000/gvfs is not accessible: Permission denied
Then I went to a naigos FAQ and found it. The official website said this was a bug, for bug #615848. The prob
From the initial Nagios to the now powerful Zabbix 3.0, I would say that no performance-based development and monitoring are all nonsense?First of all, I am aware of these two monitoring software:Zabbix, a lot of enterprises are in use, give a person's feeling is very dazzling, but I personally think that although it is powerful, can draw a cool image, but in you
1. About Nagiosis an open source software that can monitor network device network traffic, linux/windows host status, and even monitor the printerIt can run on Linux or on WindowsBrowser-based web interface makes it easy for operations personnel to view the status of monitoring itemsSupport Web interface configuration, management operationsSupport SMS, email notificationCustomizable scripting enables custom monitoringNagios official website http://www
NagiosServer SelfMonitoringThere are two methods for implementation, which can be simple!
Figure-Nagios
Self-monitoring implementation of Nagios Server
To monitor resources and services, you must configure the nagios server and the NRPE-nagios remote plugin
Executor)
not Runni Ng on this node "exit $CRITICALfideclare-I i=0declare-i a=0nodes= ' $CL _st listnodes ' for node in $NODESdo status= ' $CL _st Nodestatus $node ' let i= $I +1# if [$status = = "Active"] by default, the number of active states is detected, but the ping status is also normal, so the following conditions are changed. if [$status = = "Active"-o $status = = "Ping"] then let a= $A +1 fidoneif [$A-eq 0]then echo "Heartbeat CRITICAL: $A/$I "Exit $CRITICALelif [$A-ne $I]then echo" Heartbeat
Nagios's built-in Oracle monitoring check_oracle has fewer functions. You can use the check_oracle_health script written in perl.
1. Install check_oracle_health
Wget http://www.bkjia.com/system/systembak/2011/2/check_oracle_health-1.6.6.1.tar.gz
Wget http://www.bkjia.com/system/systembak/2011/2/check_oracle_health-1.6.3.tar.gz
Select any version (1.6.3 is used here)
Tar zxvf check_oracle_health-1.6.3.tar.gz
Cd check_oracle_health-1.6.3. /Configure --
cgi.cfg is used to verify the identity of the administrator.If the administrator user we generate is not nagiosadmin, the validation will fail, and the error that starts with the description will appear.so , we can now just change the user name in the config file to the actual administrator username, save it, and then restart Nagios! As I created the Administrator account for nagios_5201351 The solution is as follows:1, edit the /usr/local/
Client ip:192.168.1.11Service-Side ip:192.168.1.12Purpose: To check the existence of the Java process for EIP usersClient ConfigurationScript Name: check_pid.shThe script is as follows:#! /bin/bashSi= ' Ps-ef|grep java|grep eip|wc-l 'If [$si-eq 1];thenecho "Status OK"Exit 0Elseecho "The Pro is Down,plaese check!"Exit 1FiPlaced under the/home/monitor/nagios/libexec, that is, Nrpe plug-in storage place, Chown-r monitor:monitor check_pid.shchmod +x check
Nagios monitoring iostatThe specific steps are as follows!
NetSeek wrote an article is to use nagios monitoring iostat, But he uses the source code package compilation, specific can refer to his article http://bbs.linuxtone.org/thread-2289-1-1.html
However, the compilation method may be inconvenient for multi-host depl
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.