Monitoring Agents

OpenBSD 5 nrpe restart script

Description:

I wrote a script to reload nrpe on OpenBSD. You can easily start nrpe at boot up, but I grew tired of manually killing then launching nrpe each time I updated the nrpe.cfg file

Current Version

0.5

Last Release Date

2012-02-23

Compatible With

  • Nagios 3.x

Owner

License

GPL


Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Project Files
Project Notes
Simple script, download it or copy paste below into your own .sh file. #!/bin/ksh # Author: Kirk Hammond (kirk@elitetechservices.com) # Version 0.5 #Get present npre process ID PID=`ps -aux |grep nrpe |grep -v root | awk '{print $2}'` #If process ID was found, kill it if [ $PID ] then kill $PID echo "Killed nrpe process with PID $PID" fi #Restart nrpe service /usr/local/sbin/nrpe -c /etc/nrpe.cfg -d #Wait for process to start, otherwise PID is null sleep 3 #Get new process ID and echo it to shell NEW=`ps -aux | grep nrpe | grep -v root | awk '{print $2}'` echo "Restarted nrpe with PID $NEW"#
Reviews (0) Add a Review
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
0 (0)
Favorites
0
Views
75,634