Help with adding custom service

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
cvt1971
Posts: 1
Joined: Wed Dec 12, 2012 8:44 pm

Help with adding custom service

Post by cvt1971 »

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
ScareCrow57
Posts: 4
Joined: Tue Apr 24, 2012 6:45 am

Re: Help with adding custom service

Post by ScareCrow57 »

If you are using nrpe then simply create a command: check_procs -c 1:10 -C CrazyService
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Help with adding custom service

Post by slansing »

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.
eltrasimaco
Posts: 75
Joined: Thu Aug 02, 2012 7:15 am

Re: Help with adding custom service

Post by eltrasimaco »

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
Locked