Removing contacts from Notifications
Removing contacts from Notifications
We have decided to use Escalations to send notifications and have the normal notifications stop after the first notification. The only issue is that the original Services/Hosts all have contacts from when they were originally created. This equals about 200 hosts and 2,000 services underneath. Is there an easy way to remove the contacts from those hosts/services without reconfiguring each one individually? This is a standard license Nagios XI 2014R2
Re: Removing contacts from Notifications
There's a feature in the Enterprise Edition called Bulk Modifications that will do just that. You can start a free 60-day trial, fully featured if you are interested.
The tool is located under the CCM, in the Tools sidebar section. You'll see the option to remove a contact.
The tool is located under the CCM, in the Tools sidebar section. You'll see the option to remove a contact.
Former Nagios employee
Re: Removing contacts from Notifications
Under my License Information it says:
Enterprise Features: Trial Expired. Learn more about upgrading to Enterprise Edition.
This trial must have been used before I started working with the system.
Enterprise Features: Trial Expired. Learn more about upgrading to Enterprise Edition.
This trial must have been used before I started working with the system.
Re: Removing contacts from Notifications
Well, you can:
1. Remove them by hand
2. Upgrade to Enterprise
3. Write a query.
1. Remove them by hand
2. Upgrade to Enterprise
3. Write a query.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Removing contacts from Notifications
I'm interested in more info on the query. Do I just query the mysql database directly? I haven't entered the Nagios database before and am curious about what tables I would need to look for.
Re: Removing contacts from Notifications
I would suggest looking at the tables: nagiosql.tbl_host and nagiosql.tbl_service, specifically the "contacts" column.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Removing contacts from Notifications
It looks like the contacts fields in these tables are either 0 or 1 which to me means Yes or No. I need to be able to remove some contacts specifically but not all contacts on hosts and services notifications. Are there ways to query that will remove individual contacts from services and hosts?
Re: Removing contacts from Notifications
You need to pull the object ids for the service or host object and the id for the contact(s) in question, and then remove the relations between the two ids in the relational tables: tbl_lnk<masterId_type>To<slaveId type> (for example: lnk_ServiceToContact )
WARNING: Backup first! An incorrect update/set/delete can have dire consequences . . . .
WARNING: Backup first! An incorrect update/set/delete can have dire consequences . . . .
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Re: Removing contacts from Notifications
I'll have a look
Your response was not terrifying in the least
Your response was not terrifying in the least
Re: Removing contacts from Notifications
After looking over, I think the following would work:
Contact group Test (id 3) needs to be removed from host notifications on all hosts.
delete from tbl_lnkHostToContactgroup where idSlave='3'
I would guess I could then Apply Configuration and it's done?
BTW, I've backed up.
Contact group Test (id 3) needs to be removed from host notifications on all hosts.
delete from tbl_lnkHostToContactgroup where idSlave='3'
I would guess I could then Apply Configuration and it's done?
BTW, I've backed up.