Hello ,
I've been asked to do bulk change of contact group for all hosts in a hosts group also with all relevant services , the change include thousands of services and hundreds of hosts , the only thing I have is hostgroup name .
I could not find any tool to do this so I go to mysql nagiosql database and did some queries and changed what I need .
now I have all changes correct when browsing core config manager but changes not reflecting to nagios , whenever yo browse any of these hosts/services in CCM and click just save without changes it will detect it , but for sure cannot do the same for all changes .
is there any method/script to force nagios DB against config files and force sync ?
thanks for help
bulk changes
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: bulk changes
This can be performed using the Bulk Modifications tool.paltel wrote:I've been asked to do bulk change of contact group for all hosts in a hosts group also with all relevant services , the change include thousands of services and hundreds of hosts , the only thing I have is hostgroup name .
I could not find any tool to do this so I go to mysql nagiosql database and did some queries and changed what I need .
CCM
Tools
Bulk Modifications
NOTE: This is a part of the Enterprise Edition license. If you did not purchase this then you can activate the trial which will let you use the tool and get a taste of it's power.
Go into CCMpaltel wrote:now I have all changes correct when browsing core config manager but changes not reflecting to nagios , whenever yo browse any of these hosts/services in CCM and click just save without changes it will detect it , but for sure cannot do the same for all changes .
is there any method/script to force nagios DB against config files and force sync ?
Tools > Write Config Files
Click the Delete button
Quick Tools > Apply Configuration
Click the Apply Configuration button
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: bulk changes
Thanks for kind reply ,
how come this is doable via ccm bulk modifications tool ? lets say I have 1000 host in host group named " IT servers " , each host has a lot of services , how can I select all services that belongs to this host group ? as no service groups defined ?
Thanks
how come this is doable via ccm bulk modifications tool ? lets say I have 1000 host in host group named " IT servers " , each host has a lot of services , how can I select all services that belongs to this host group ? as no service groups defined ?
Thanks
Re: bulk changes
If you used the Bulk Modifications Tool, and clicked on the "Select Hosts using Hostgroups", the contact group would be added only to hosts, members of your hostgroup. In order to add the contactgroup to services, you will need to click on "Select Services", select all of the services you need to add the contactgroup to, and add them in one go.
With so many services (i.e. on 1000 hosts), this could be somewhat a tedious task. You may want to try modifying your services from the command line, by implementing some kind of scripting solution. Please review your "Automated Host Management In Nagios XI" document here:
https://assets.nagios.com/downloads/nag ... gement.pdf
Hope this helps.
Edit: I assumed you have specified some contacts implicitly to these services. In case you didn't, and the only contacts you would like to add are these in the contactgroup, you could use the "Select Hosts using Hostgroups" option in the "Bulk Mod" tool. Contact groups in services will be inherited from the hosts they are associated with via implied inheritance.
https://assets.nagios.com/downloads/nag ... tance.html
With so many services (i.e. on 1000 hosts), this could be somewhat a tedious task. You may want to try modifying your services from the command line, by implementing some kind of scripting solution. Please review your "Automated Host Management In Nagios XI" document here:
https://assets.nagios.com/downloads/nag ... gement.pdf
Hope this helps.
Edit: I assumed you have specified some contacts implicitly to these services. In case you didn't, and the only contacts you would like to add are these in the contactgroup, you could use the "Select Hosts using Hostgroups" option in the "Bulk Mod" tool. Contact groups in services will be inherited from the hosts they are associated with via implied inheritance.
https://assets.nagios.com/downloads/nag ... tance.html
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: bulk changes
Have a look at write config files in CCM, under tools.
In the long run using templates would allow this info to be stored in one place, making use of the bulk change tool, and modifying the DB directly unnecessary.
In the long run using templates would allow this info to be stored in one place, making use of the bulk change tool, and modifying the DB directly unnecessary.
Re: bulk changes
Former Nagios Employee.
me.
me.
Re: bulk changes
I believe gormank is correct. When you changed the information in the DB (not something we recommend at all) I'm not sure if the last update time actually changed or not.
Go to Configure > Core Config Manager > Tools > Write Config Files
- Click Delete (don't worry, it's safe, they get re-written)
- Click Write
- Click Verify to make sure you don't have any errors
- Now apply configuration
Thank you
Go to Configure > Core Config Manager > Tools > Write Config Files
- Click Delete (don't worry, it's safe, they get re-written)
- Click Write
- Click Verify to make sure you don't have any errors
- Now apply configuration
Thank you
Re: bulk changes
Hello ,
Thanks , Delete config and re apply them solved my problem
Regards
Thanks , Delete config and re apply them solved my problem
Regards
Re: bulk changes
That's great to hear! Locking the thread and marking it as resolved.