Check service status with plugin

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Check service status with plugin

Post 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)
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Check service status with plugin

Post 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'
johndoe
Posts: 114
Joined: Fri Oct 28, 2011 10:14 am

Re: Check service status with plugin

Post 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
Nagios XI 2012R2.8c Running on Ubuntu 12.04 Using 99% passive checks for monitoring
Monitoring nearly 800 Passive services spread through roughly 40 machines
Running on an 8 core, KVM virtualized VM, with 15 GB of RAM and using RAMDisk
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Check service status with plugin

Post by mguthrie »

Good deal!
Locked