How do you configure and use Nagios plugins from Nagios Exch

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.
Alan
Posts: 86
Joined: Wed Aug 21, 2019 4:14 pm

How do you configure and use Nagios plugins from Nagios Exch

Post by Alan »

I am trying to figure out how to use and configure plugins from Nagios Exchange. I am trying to find a guide that shows me where to put the plugin once downloaded then what files I need to change to get it working. Something like these two URLs:

https://assets.nagios.com/downloads/nag ... installing

https://assets.nagios.com/downloads/nag ... uters.html

I am trying to find a way to schedule downtime for all host in Nagios at once for a maintenance window, then take them all out of scheduled downtime at the end of the window. Can Nagios do this on its own? If not, are there any guides or can you tell me how to get plugins working.

This is what I know so far. Download the plug-in example the one I downloaded is the Nagios Mass Acknowledge and Mass Downtime Scheduler. Then I am assuming this goes in the /usr/local/nagios/libexec location. Then I am not sure what to do.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How do you configure and use Nagios plugins from Nagios

Post by ssax »

That is only a utility to help you, it's not a plugin for checking.

Code: Select all

wget -O mass_scheduler.pl 'https://exchange.nagios.org/components/com_mtree/attachment.php?link_id=2252&cf_id=24'
Edit the file and set your nagios.cfg location:

Code: Select all

$nagios_config = '/usr/local/nagios/etc/nagios.cfg';
Run it:

Code: Select all

perl mass_scheduler.pl
That's how you'd use this utility.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How do you configure and use Nagios plugins from Nagios

Post by cdienger »

It looks like the tool is used to acknowledge things but I haven't been able to get it to schedule downtime yet. You can schedule downtime via the web interface though. After logging in go to System > Downtime.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Alan
Posts: 86
Joined: Wed Aug 21, 2019 4:14 pm

Re: How do you configure and use Nagios plugins from Nagios

Post by Alan »

When going to System > Downtime this seems to only take one host at a time. I am just trying to not have to do this several hundred times. So the mass_scheduler.pl does not allow me to put all the hosts in scheduled downtime at once? I was thinking I can just stop the service with - /etc/rc.d/init.d/nagios stop

But doing this will affect the uptime report. I am not wanting to mess with that.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: How do you configure and use Nagios plugins from Nagios

Post by cdienger »

It appears to search for hosts and services that are throwing alerts and then allows you to schedule downtime for the ones it finds. Something like https://exchange.nagios.org/directory/A ... er/details is probably more in line with what you want to do.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Alan
Posts: 86
Joined: Wed Aug 21, 2019 4:14 pm

Re: How do you configure and use Nagios plugins from Nagios

Post by Alan »

This does look like this is what I would need. We do maintenance windows once a month and we take all servers down at one point within this window. So I would need to basically disable all alerts for about 4 hours. I am going to download it and see if I can get it working. If I have trouble with this am I able to get help with these plugins here?

One other question I have if I just run the:

Code: Select all

/etc/rc.d/init.d/nagios stop
command with this affect the uptime of the server or will it basically pause it and then just pick up after running:

Code: Select all

/etc/rc.d/init.d/nagios start
Just wandering because I have never used a plugin before and it will probably be a task for me to get it working.
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: How do you configure and use Nagios plugins from Nagios

Post by mbellerue »

Absolutely you can come here for help with plugins.

Regarding shutting down the Nagios service, are you referring to the uptime of the server that runs Nagios? That shouldn't be affected here, since you're just turning Nagios off. Any performance data you are collecting regarding the servers you are monitoring will have a gap for as long as Nagios is off, however.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Alan
Posts: 86
Joined: Wed Aug 21, 2019 4:14 pm

Re: How do you configure and use Nagios plugins from Nagios

Post by Alan »

Ya the one I was looking at was the % Time Up and I did a test last night and turned off the Nagios service and then turned it back on this morning and you are right it did not seem to affect it. I absolutely did not think about the performance data though. So I am thinking at first just disabling the service to move off our old system and start to use Nagios full time but then just work on getting the Plugin to work. This host state Breakdowns is what I was looking to see if it affected the % Time up.
Attachments
% Time Up.png
Alan
Posts: 86
Joined: Wed Aug 21, 2019 4:14 pm

Re: How do you configure and use Nagios plugins from Nagios

Post by Alan »

I do have another question about downtime. With Triggered Downtime it says "you might want to schedule triggered downtime for all of that hosts's "children"."

So the way that I am reading this is I can schedule downtime lets say for a Hyper-V host and have the children be all the VM running on it. Does this sound right? How do I get hosts as children so when I put one in downtime it will put the rest of the children in downtime also?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: How do you configure and use Nagios plugins from Nagios

Post by mbellerue »

Yes, that is the way of it. You want to read up on Host and Service dependencies.
https://assets.nagios.com/downloads/nag ... ncies.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked