I have some services that I need to ensure are up 24/7 on my Red Hat servers. I tried to monitor them using SNMP and the root account within the default templates within SAM but they didn't work. While trying to find out why this was I came across the following thread here on Thwack.
Monitoring "Services" in Red Hat Linux?
This states that with RedHat you haver to use Perl scripts to monitor the processes. I have spent days looking for a script to do this (I cant be the first Systems Administrator looking to monitor services in a ReedHat environment) but to no avail. I have no previous experience in Perl and would greatly appreciate it if someone could help out here or point me in the right direction as to how to do this or even to write the script I would be eternally grateful.
I am hoping that the script will basically run the following command on the Red Hat box.
service **** status
And based on the result return green for the service is running and red for service stopped.
I am specifically interested in the following services,
httpd/tomcat/tomcat2/mysql
As I said any help would be greatly appreciated.