Hi everybody,
I have to modify a lot of services (more than 1000) in order to change the 'contact options' under the tab 'Alert settings' --> 'Manage contacts'.
The goal is to activate the option '+', so that the notification contacts inserted in the Service template will be added (and not overrided) by the contact present in the service definition.
From some tests i've made this config seems to be stored a database, but i've not been able to identify the right table/field.
Do someone know where this configuration is stored?
Regards,
Francesco
Bulk modification for 'contact options', via db is possible?
Re: Bulk modification for 'contact options', via db is possi
I would not recommend modifying objects directly, via db queries. This is not a supported option. However, it should be very easy to perform these actions via the "Bulk Modifications" tool. It is part of the Nagios XI Enterprise edition, but even if you didn't have Enterprise, you could start a 60-day, free, fully-functional trial of Enterprise features, and get the job done.
Go to the CCM->Tools->Bulk Modifications->Add Contact(s)->Select a contact->Select Services->Select all of the services you need to add this contact to, select the "+" radio button (for additive inheritance option), click on "Add Selected", "Close", "Save Changes", and apply configuration.
Go to the CCM->Tools->Bulk Modifications->Add Contact(s)->Select a contact->Select Services->Select all of the services you need to add this contact to, select the "+" radio button (for additive inheritance option), click on "Add Selected", "Close", "Save Changes", and apply configuration.
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 modification for 'contact options', via db is possi
Hi lmiltchev,
thanks for the interesting information, this is yet a step further!
But i'm trying to reduce the working time as much as possible, and selecting more than 1000 services reading them from an excel file is still a quite boring job
Also because probably i'll have to repeat this work still a few times!
I have a test server and a backup of the whole database and configuration files however, do you know the way to modify these settings at database? or where could i read something related to my issue...
Perhaps could i find a script?
Regards,
Francesco
thanks for the interesting information, this is yet a step further!
But i'm trying to reduce the working time as much as possible, and selecting more than 1000 services reading them from an excel file is still a quite boring job
Also because probably i'll have to repeat this work still a few times!
I have a test server and a backup of the whole database and configuration files however, do you know the way to modify these settings at database? or where could i read something related to my issue...
Perhaps could i find a script?
Regards,
Francesco
Re: Bulk modification for 'contact options', via db is possi
I've spent some time this morning looking at the structure of the Database, and it looks like there's no simple way to replace 'A' with 'B' using a query, if that makes sense. You may want to consider making changes to your flat files using a script, and then using the 'import' directory to import them. Let me know if any of that is unclear.
Former Nagios Employee.
me.
me.
Re: Bulk modification for 'contact options', via db is possi
Ok,
thanks for your support.
I've tried via 'Bulk modification' command, but following the steps you wrote i can add contact to several services, but in the tab i've no possibility to select the '+' options, it's not present.
The 'Bulk modification tool' version is the 1.2.3.
thanks for your support.
I've tried via 'Bulk modification' command, but following the steps you wrote i can add contact to several services, but in the tab i've no possibility to select the '+' options, it's not present.
The 'Bulk modification tool' version is the 1.2.3.
Re: Bulk modification for 'contact options', via db is possi
To add to what hsmith mentioned, the OP could create a service template w/ the contact info, then add the template definition to tiny service files with the same names as those to update, then import.
Now the updated contact info exists in a single location and can be updated for all services easily. Combine templates and hostgroups, and instead of lots of similar services, you have a smaller number to manage. It would take some effort to convert though...
Here's an example of a service containing no info other than that needed to define the service. Host info is in hostgroups, and monitoring/contact info is in a template.
Now the updated contact info exists in a single location and can be updated for all services easily. Combine templates and hostgroups, and instead of lots of similar services, you have a smaller number to manage. It would take some effort to convert though...
Here's an example of a service containing no info other than that needed to define the service. Host info is in hostgroups, and monitoring/contact info is in a template.
Code: Select all
define service {
service_description Proc_Win_Antivirus
use default_service
hostgroup_name Windows_Physical,Windows_Virtual
display_name McAfee Antivirus services
check_command check_xi_service_nsclient!xxxx!SERVICESTATE!-l macmnsvc,masvc,McAfeeFramework,McShield,McTaskManager,mfemms,mfevtp -d SHOWALL!!!!!
_xiwizard windowsserver
register 1
}
Re: Bulk modification for 'contact options', via db is possi
Another possible solution, which will require some scripting knowledge is described here:
https://assets.nagios.com/downloads/nag ... gement.pdf
As far as the "Bulk Modifications" tool component - the "additive" option is available in Version: 2.0.3 (present in Nagios XI 5.2.3). What is the version of XI that you are currently using?
https://assets.nagios.com/downloads/nag ... gement.pdf
As far as the "Bulk Modifications" tool component - the "additive" option is available in Version: 2.0.3 (present in Nagios XI 5.2.3). What is the version of XI that you are currently using?
Be sure to check out our Knowledgebase for helpful articles and solutions!