enable all OK(green) services at once

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

enable all OK(green) services at once

Post by amit.ahuja »

I have 3000+ services and some of them are disabled. Is there a way to enable all OK(green) services at once instead of manually enable one by one?
services.png
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: enable all OK(green) services at once

Post by lmiltchev »

Are you talking about enabling notifications on all services that are in OK state? Can you elaborate?
Be sure to check out our Knowledgebase for helpful articles and solutions!
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: enable all OK(green) services at once

Post by amit.ahuja »

Yes, I want to enable alert notification for all services that are in OK state.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: enable all OK(green) services at once

Post by lmiltchev »

This functionality doesn't exist in XI. I am not even sure why you would want to be notified only about services that are in "OK" state? Don't you want to be notified when there is a problem?

Anyway, if you know what services are in "OK" state, you could enable notifications for all of them "in one go" via the "Bulk Modifications Tool".

CCM->Tools->Bulk Modifications->Change a Single Config Option->Notifications Enabled=on->Select all of the services from your "OK" list (tip: hold the "Ctrl" key to select multiple services)->Add Selected->Close->Save Changes->Apply Configuration

The "Bulk Modifications Tool" is a part of Nagios XI Enterprise edition. If you haven't purchased Enterprise yet, you can start a 60-day, fully functional trial, and get the job done.

Hope this helps.
Be sure to check out our Knowledgebase for helpful articles and solutions!
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: enable all OK(green) services at once

Post by haile711 »

lmiltchev,
We have a case where initially we want to disable all the notification by default. When we add the services, and we want to turn on the notification for the "OK, green" status first. The "Critical" status we are still working on, we don't want to be bombarded with notifications from these services. Currently we are using the "static" directory for config all of our services therefore we could not use the "Bulk Modifications Tool" these services doesn't show up there.

Many Thanks

Hai
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: enable all OK(green) services at once

Post by lmiltchev »

If you are setting up some hosts+services in "static" to test them first (before importing them), you could add all of the hosts to a "test" hostgroup. Disable notifications globally in XI by going to Admin->Monitoring Engine Status, and clicking on the "Disable" actions button next to "Notifications". Log into the Nagios Core web interface:

Code: Select all

http://ip address/nagios/
Go to "Host Groups", then click on the "test" hostgroup (test). Then click on "Disable notifications for all services in this hostgroup" (Disable For Hosts Too: = checked), and press "Commit". You can now enable notifications globally. The hosts, members of the "test" hostgroup should have notifications disabled (+services).

Check the status of services in let's say an hour. Remove the hosts with "non-ok" services from the "test" hostgroup, then enable notifications for the whole "test" group (the remaining members should have their services in OK state).

This is just a workaround. There could be better ways for achieving the same goal. You could probably come up with some scripting solution but this is out of the scope of nagios support.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked