Monitoring Services with help of nagios plugins

I installed the nagios plugins and want to monitor a service on a server. Just an up/down check.

I don’t see a ‘service’ in the drop down under add services.

How do I accomplish this? is this just syntax? An example would be awesome.

I have the check_mk agent installed on the server (not sure it is needed) but it is their and running.

Do I need to put an additional plugin in the /usr/lib/nagios/plugins folder? If so which one?

I am trying to set up an up/down monitor for a service on a windows server.

Did you $config['nagios_plugins'] = "/usr/lib/nagios/plugins"; with the correct path?

yes, it appears to be working, the drop down box has a list. I just don’t know how to configure it to monitor a service on a windows server. Lets say for whatever reason I wanted to monitor the service ‘windows update’ on server ‘MyServer2012R2’ and I want an alert if that service goes down.

Which option do I choose in LibreNMS drop down box? What is the syntax?

Do I need anything additional such as a specific plugin from the nagios exchange? Do I need to have Check_MK installed on ‘MyServer2012r2’?

“Out of the box” the nagios plugins are installed on the librenms server and only can run remote checks.
If you want to monitor a windows service you need to
-either have a proxy at a windows box and remote service checks enabled (AD domain needed afaik)
-or have another tool installed on the target box. This might be the check_mk agent, but I think that windows part of it has not been worked on in a while so not sure its actually still working on whatever you have .

Above is about as far as I have gotten before it lost priority, so can’t help with the next step, sorry.

@TecDragon assuming that you already installed the nagios-plugins and enabled it in config.php

You’ll just need to make the plugins executable. Try this command:

chmod +x /usr/lib/nagios/plugins/*

And add to the current cron file.

*/5 * * * * librenms /opt/librenms/ 1

Now you can add services via the main Services link in the navbar, or via the ‘Add Service’ link within the device, services page.

Yea, I am trying to check the Up/Down status of a service on a windows server. That server is on the domain in the same environment but is not the server running LibreNMS. Man… So close and yet so far, LibreNMS is awesome just trying to figure out this last piece as I have a few critical services that I have to monitor.

I installed the Check_MK client on the server, but I don’t know the syntax or even if the syntax exists to tell LibreNMS to check the status of that service. Add Service - Check Up/Down on service ‘windows update’ on - something like that.

My kingdom for WMI queries :slight_smile:

@TecDragon I’m not sure if this will help, but I just saw a recent blog post similar to what you’re asking.

Another idea, since you mentioned having the Check_MK agent installed on your server is to use MRPE.

See MPRE section at:

So basically, the Check_MK agent runs whatever Nagios script you want locally.

Then, if you put this script in your LibreNMS server’s Nagios plugins directory you should get a new MPRE service option. Use parameter -a [name] with the name you specified in the MPRE config and if should poll the data through the agent.

1 Like

Can I see your cron.job file?