Easiest way to Mass change contact group settings for Alerts

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Easiest way to Mass change contact group settings for Alerts

Post by isadmin »

I have been asked to re-organize the way our contact groups are notified. This would have been a little tedious but easy
just editing the older version text configs.

Since our migration to the NEW Nagios XI broke out all host and services to individual config files that cannot be easily modifed what is the best way to accomplish this.

He is our scenario.
All notifications are set to contact Helpdesk Contact Group, Admins, etc....basically everyone is notified...

Now we want

All Windows Servers and/or services need to notify Windows Admins first then escalate to Helpdesk.
Same for Router Admins, Linux Admins etc....
Since all service notifications and host notifications are individual configs I dont want to point and click through 2000 Web sittings you know?
Would the escalation Wizards solve all of this easily and change all current settings already in effect?
Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Easiest way to Mass change contact group settings for Al

Post by scottwilkerson »

I would use Configure -> CCM -> Tools -> Bulk Modification Tool to make the changes for the initial alert. One caveat is that we just found a bug in sourceguardian that can affect the use of this tool, so you will want to do the following first

Code: Select all

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/patches/patch_sourceguardian.zip
unzip -u patch_sourceguardian.zip
chmod +x patch_sourceguardian.sh
./patch_sourceguardian.sh
Then, I would setup the escalation with the Configure -> CCM -> Tools -> Escalation Wizard.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: Easiest way to Mass change contact group settings for Al

Post by isadmin »

Code: Select all

Receiving error updating 


2012-11-19 11:09:13 (1.25 MB/s) - `patch_sourceguardian.zip.1' saved [2431978/2431978]

[root@server]# unzip -u patch_sourceguardian.zip
Archive:  patch_sourceguardian.zip
[root@server tmp]# chmod +x patch_sourceguardian.sh
[root@server tmp]# ./patch_sourceguardian.sh
Archive:  sourceguardian/ixed4.lin.x86-64.zip
checkdir:  cannot create extraction directory: /usr/lib/php/modules
           No such file or directory

scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Easiest way to Mass change contact group settings for Al

Post by scottwilkerson »

Oh darn it, can you edit patch_sourceguardian.sh change the path on line 18 from /usr/lib/php/modules to /usr/lib64/php/modules

Then

Code: Select all

./patch_sourceguardian.sh
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: Easiest way to Mass change contact group settings for Al

Post by isadmin »

patch succeeded will check the tools out now...Thanks again Scott!
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: Easiest way to Mass change contact group settings for Al

Post by isadmin »

Hmm something in the tools wiped my contacts contact groups....no users have contact groups now?
And I am receiving alerts for a contact group I dont belong too? Not sure where to start digging on this on. Going off shift but will dig in the morning.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Easiest way to Mass change contact group settings for Al

Post by scottwilkerson »

That is strange, the tool shouldn't modify a contact's contact group settings at all...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: Easiest way to Mass change contact group settings for Al

Post by isadmin »

Scott also I noticed many services stating they dont have notification times. This had to be caused by Bulk Change tool 286 Warnings on "No Notification Time Period Defined" now :shock: ...and many Services not alerting correctly. We have always used Service Templates and Notification Groups for our alerting.
I dont see a choice in Bulk Modifications to apply a template to services/hosts.
Now we never used service groups in our old Nagios core configs could this be the issue?
and I havent ran the escalations wizard yet as I was wanting everything cleaned-up before hand.

Code: Select all

partial output..

Warning: Service 'Services for VMHost' on host 'vm7' has no notification time period defined!
Warning: Service 'VM Status for VMHost' on host 'vm7' has no check time period defined!
Warning: Service 'VM Status for VMHost' on host 'vm7' has no notification time period defined!
Warning: Service 'Ping' on host 'waupaca-router' has no check time period defined!
Warning: Service 'Ping' on host 'waupaca-router' has no notification time period defined!
Warning: Service 'Ping' on host 'waupun-router' has no check time period defined!
Warning: Service 'Ping' on host 'waupun-router' has no notification time period defined!
Checked 1093 services.
Checking hosts...
Checked 727 hosts.
Checking host groups...
Checked 12 host groups.
Checking service groups...
Checked 0 service groups.
Checking contacts...
Checked 21 contacts.
Checking contact groups...
Checked 14 contact groups.
Checking service escalations...
Checked 0 service escalations.
Checking service dependencies...
Checked 0 service dependencies.
Checking host escalations...
Checked 0 host escalations.
Checking host dependencies...
Checked 562 host dependencies.
Checking commands...
Checked 178 commands.
Checking time periods...
Checked 26 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 286
Total Errors: 0 
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Easiest way to Mass change contact group settings for Al

Post by scottwilkerson »

This wasn't caused by the bulk mod component, it is another bug we are working on. Here is the fix

go to Configure -> CCM -> Tools -> Static Configurations
Select /usr/local/nagios/etc/static/xiobjects.cfg
Load File
Remove this time period

Code: Select all

define timeperiod{
	timeperiod_name xi_timeperiod_24x7
	alias           24x7
	sunday          00:00-24:00
	monday          00:00-24:00
	tuesday         00:00-24:00
	wednesday       00:00-24:00
	thursday        00:00-24:00
	friday          00:00-24:00
	saturday        00:00-24:00
	}
Save

go to Configure -> CCM -> Time Periods -> xi_timeperiod_24x7 -> Modify
Check Active
Save
Apply Configuration
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
isadmin
Posts: 151
Joined: Thu Nov 08, 2012 10:49 am

Re: Easiest way to Mass change contact group settings for Al

Post by isadmin »

errors with missing required field assuming it refers to *description I added the xi_timeperiod_24x7 in description which allowed it to save
Locked