Software

check_supervisorctl

Description:

Checks supervisorctl for programs that are not in the state of RUNNING.
That is to say STOPPED, STARTING, BACKOFF, STOPPING, EXITED, FATAL, UNKNOWN

In my implementation requires SUDO to run supervisorctl.
To run: ./check_supervisorctl
Tested on CentOS 5.5 / RHEL 5

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Current Version

.1

Last Release Date

2011-03-03

Compatible With

  • Nagios 3.x

License

GPL


Project Files
Project Notes
#Intended For: Users that run supervisor & supervisorctl who want to monitor their programs / workers using Nagios. #Required: supervisorctl, egrep, wc #Quick Description: This script uses the supervisorctl program to check the status of all programs. #Why?: Sometimes a program fails or doesn't start and you need to know about it. If supervisord process is running, but the programs aren't, you will never be notified. #Detailed Description: User supervisorctl, egrep, and wc to check for non-running programs. No command line parameters are required. #What: Nagios check_supervisorctl.sh plugin #Background: Our supervisor / supervisorctl daemons run as root. This may be different for your environment. #Installation 1. EDIT: /usr/local/nagios/etc/commands.cfg. ADD: command[check_supervisorctl]=sudo /usr/local/nagios/libexec/check_supervisorctl.sh 2. EDIT: sudoers /etc/sudoers ADD: nagios ALL=(ALL) NOPASSWD:/usr/local/nagios/libexec/check_supervisorctl.sh On CENTOS / RHEL comment out the line "Defaults requiretty" 3. EDIT: Your host definition config file ADD: Service definition define service{ use generic-service host_name HOSTNAME service_description Supervisor Workers check_command check_nrpe!check_supervisorctl notifications_enabled 1 notification_period 24x7 notification_interval 30 contact_groups CONTACTGROUP } ***Obviously change HOSTNAME and CONTACTGROUP to whatever your environment requires. 4. Change ownership chown nagios:nagios /user/local/nagios/libexec/check_supervisorctl.sh 5. Change permissions make check_supervisorctl.sh executable chmod 744 /user/local/nagios/libexec/check_supervisorctl.sh
Reviews (1) Add a Review
bug
by fraff, July 31, 2017

try: bash -x check_supervisorctl.sh -help



Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
1 (1)
Favorites
0
Views
161,883