Blackout/Maintenance automation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Sundar
Posts: 35
Joined: Tue Nov 24, 2015 5:41 am

Blackout/Maintenance automation

Post by Sundar »

Client wants blackout/maintenance enhancement features like the ones mentioned below actually automated

1) Bulk upload/Multiple hosts
2) Blackout using cluster name
3) Blackout using service group
etc.,

We are looking to get some custom script created to meet these requirements. We could see this may be achieved via couple of options (do we have other options?)

i) curl -d "cmd_typ=23&cmd_mod=2&host=[THE-HOST]&service=[THE-SERVICE]&btnSubmit=Commit" "http://[NAGIOS-SERVER]/nagios/cgi-bin/cmd.cgi"

ii) Using external commands - http://old.nagios.org/developerinfo/ext ... mand_id=16

However, we would like to know how exactly these are different & which is the best way to schedule blackout for multiple hosts & services via commandline, that can be run from a remote host. Please advise on how to approach a feasible solution via scripting. Is there any existing script that can be customized?

Rgds,
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Blackout/Maintenance automation

Post by tmcdonald »

Option 1 will definitely work in an automated fashion, you'll just need to provide the glue that will run the script against the hosts you need. Option 2 is basically the same thing as option 1, just instead of using a URL it uses a direct write to the command file and is usually done on the Nagios machine itself instead of remotely. Otherwise the two have the same effect.
Former Nagios employee
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Blackout/Maintenance automation

Post by rkennedy »

1. Are you talking about adding new hosts? We have an enterprise feature available, and that has bulk modifications allowed.

2. When you say cluster name, what are you referring to?

3. I believe you'll also need a ticket or authentication if you're using core.
i) you're going through the core interface (would need basic auth)
ii) you're using XI (I'm guessing your using the API?) can you provide the whole link? (this would use a ticket=)

I believe both will accomplish the same thing. We do have a bulk schedule downtime as well, but it's not through the CLI.
Former Nagios Employee
Locked