Page 1 of 1

Check service status with plugin

Posted: Mon Sep 24, 2012 8:37 am
by johndoe
Hi All,

Searching for a plugin that can check the status of a service.

Came across this: http://www.linux-noob.com/forums/index. ... -of-linux/ however in my case just changing the shell doesn't work (ubuntu 12.04)

How are you all checking the status of "ufw" for example (and others that just show the status via init.d scripts)

Re: Check service status with plugin

Posted: Mon Sep 24, 2012 10:36 am
by mguthrie
Verify that the plugin has executable permissions, and if that isn't the issue it may need root permissions to check the status or some services. You can test the execution of a plugin as the nagios user by running:

Code: Select all

su nagios -c './check_something'

Re: Check service status with plugin

Posted: Fri Sep 28, 2012 1:44 am
by johndoe
I have solved my question by allowing the nagios user to only run the "service xxx status" on the sudoers file, i believe this is safer than giving an actual shell /bin/bash to the nagios user

Re: Check service status with plugin

Posted: Fri Sep 28, 2012 11:54 am
by mguthrie
Good deal!