Hello All,
We have Nagios Core 3.4.1 monitoring 30 servers, 10 switches. Servers being monitored are CPU/HD/Ping. Nagios is running on a Red Hat Enterprise 6 ...Everything is running awesome and we are monitoring everything via web interface. We can see if a server or switch goes down, but would like to monitor something that is not on a template
Task: We have custom developers and they have created a program that is running as a service. The Server is named "LinuxServer1" and the service is called "CrazyService" located in /etc/init.d
We would like to monitor when "CrazyService" has stopped running... please help!
Server: LinuxServer1
Service to monitor: CrazyService
Location of service: /etc/init.d
Thank you !
CVT
Help with adding custom service
-
- Posts: 4
- Joined: Tue Apr 24, 2012 6:45 am
Re: Help with adding custom service
If you are using nrpe then simply create a command: check_procs -c 1:10 -C CrazyService
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Help with adding custom service
That, as well as this:
http://assets.nagios.com/downloads/nagi ... h_NRPE.pdf
This will allow you to monitor a service and restart it if an issue occurs.
http://assets.nagios.com/downloads/nagi ... h_NRPE.pdf
This will allow you to monitor a service and restart it if an issue occurs.
-
- Posts: 75
- Joined: Thu Aug 02, 2012 7:15 am
Re: Help with adding custom service
Or create a service check with a custom command (shellscript) something like
#!/bin/sh
RES=0;if ! /bin/ps -C CrazyService >/dev/null; then RES=2; fi
exit $RES
#!/bin/sh
RES=0;if ! /bin/ps -C CrazyService >/dev/null; then RES=2; fi
exit $RES