Page 1 of 1

Mass change to Check and Alert Settings

Posted: Fri Jun 07, 2019 10:24 am
by rferebee
Good morning,

I'd like to know what would be the simplest way to perform a mass change on every Service Check in our XI environment.

We're finding some irregularities in our environment whenever something goes wrong and typically it stems to the fact that the particular Service Check has no Check or Alert settings configured.

We have a baseline that we normally apply to every new Service Check, so we'd like to ensure at the bare minimum everything is set to that. We don't want to change Contacts or Contact Groups; just things like Check Interval, Retry Interval, Max Check Attempts, Check Period and Notification Period.

Thank you.

Re: Mass change to Check and Alert Settings

Posted: Fri Jun 07, 2019 11:52 am
by benjaminsmith
Hi @rferbee,

Have you tried the Bulk Mods Tool ( go to Configure > Tools > Bulk Modifications Tool) and select Change a Single Configuration Option)? One thing to note, if you have a really large system, I would recommend making changes in batches as it's possible to hit the PHP limits.
bulk-mods.png
Let me know if you have any questions.

Re: Mass change to Check and Alert Settings

Posted: Fri Jun 07, 2019 12:34 pm
by rferebee
Yeah, I was hoping there was something that could be done via the CLI?

I'm hesitant to use the Bulk Modification tool for the very reason you mentioned. It would be tough to do batches since we have over 3500 Service Checks at the moment.

Is there any sort of command that could be written to make changes to the service checks directly in the DB?

Re: Mass change to Check and Alert Settings

Posted: Fri Jun 07, 2019 1:31 pm
by benjaminsmith
Hi @rferebee,
I'm hesitant to use the Bulk Modification tool for the very reason you mentioned. It would be tough to do batches since we have over 3500 Service Checks at the moment.
You can also up php limits, please see the link below for directions.

Nagios XI - Optimizing The PHP Settings File

You can update configuration options using the API, go to Help> API Docs > Config Reference > Services. However, you would have to create a custom script to automate this over 3500 services checks.

Re: Mass change to Check and Alert Settings

Posted: Mon Jun 10, 2019 9:57 am
by rferebee
Ok, thank you. We'll work out a way to get this done.

You can lock this thread.

Re: Mass change to Check and Alert Settings

Posted: Mon Jun 10, 2019 10:20 am
by benjaminsmith
Hi @rferebee,
You can lock this thread.
Thanks for update. Closing.