In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how Nagios monitors Sphinx's indexer log". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how Nagios monitors Sphinx's indexer log".
How to use it:
# 1. Log on to the server running sphinx, and download the script to the libexec directory of nagios, for example: cd / usr/local/nagios/libexec/wget http://down.chengyongxu.com/check_indexer_log##2. Change to the master and add the executive authority chown nagios:nagios check_indexer_logchmod 755 check_indexer_log##3. Add the following line to the nrpe.cfg file Modify the parameters according to your needs #-add text-start-command [check _ indexer_log] = / usr/local/nagios/libexec/check_indexer_log#-- -add text-end-# # 4. Restart nrpeservice nrpe restart##5 after saving exit. To add a service monitor to the main monitoring server #-- add text-- start-- define service {host_name 10.0.0.166service_description check_indexer_logcheck_command checknrpeaked checkpoints indexerer logmaxcheckcheckboxes attempts 3check_interval 10retry _ Interval 5check_period 24x7notification_interval 30notification_period 24x7notification_options w Contacts (*) contact_groups sa_groups} #-add text-end-# # 6. Restart the nagiosservice nagios restart plug-in after saving and exiting is posted as follows: #! / bin/bashLOG_DIR=/usr/local/sphinx/var/logUPDATE_TIME=40# the file with the earliest last change time and its change time, in the format 03-0317 nagiosservice nagios restart = `ls-t $LOG_DIR/*searchd.log | tail-n 1`TIME _ A = `ls-tl $LOG_DIR/*searchd.log | tail-n 1 | the last update time required by awk'{print $6 $7}'`# The format is 03-0317 if B = `date +% m-%d%H:%M-d "$UPDATE_TIME min ago" `if [["$TIME_A" > "$TIME_B"]] thenecho "OK | All files changed in $UPDATE_TIME minutes" elseecho "$FILE_A last update time is $TIME_A" exit 2fi thank you for reading. This is the content of "how Nagios monitors Sphinx indexer logs". After studying this article I believe that you have a deeper understanding of how Nagios monitors the indexer log of Sphinx, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.