Hi,
We have few system admin and each system admin own different servers. So, I want to set Nagios (core) send notification send to him/her only if his/her own server down. I am using nagios version 3.4.3 and with Centos 6.3. Please help. I am a new nagios user.
Regards
Tho.
Individualy server notification
Re: Individualy server notification
Hi Tho,
So your nagios server is monitoring multiple hosts, and each host has it's own admin?
In your contacts.cfg define each admin with their email address, etc.
In your hosts.cfg add to each host the line below, replacing it with the host's admins name;
I assume your services are using the generic service template?
Please correct me if I am wrong, but the best bet would be to force your services to use your hosts contacts definition by commenting out the contacts and contact_group line from the generic-service template in templates.cfg.
Hope this helps.
Kind Regards,
Gary Shergill
So your nagios server is monitoring multiple hosts, and each host has it's own admin?
In your contacts.cfg define each admin with their email address, etc.
In your hosts.cfg add to each host the line below, replacing it with the host's admins name;
Code: Select all
contacts <admin contact_name>
Code: Select all
use generic-service
Hope this helps.
Kind Regards,
Gary Shergill
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Individualy server notification
I would go with Gshergill's suggestion of using contacts, as this allows you to more easily control who you have assigned to receive notifications, and make quick changes if necessary.
Re: Individualy server notification
Thank you Gary and Slansing
I did not use template.cfg. What I did is I copied the localhost.cfg and modified it for each server (ex:I get 20 servers then I will have 20 .cfg file for each server and locate them in the nagios.cfg file). And in the contact.cfg file, and in the original define contact session I put in the admin group email address.
So, I will define the contact name for each admin. So, could you tell me which session in the hosts.cfg file should I add the lines "contacts <admin contact_name>?
Regards,
Tho.
I did not use template.cfg. What I did is I copied the localhost.cfg and modified it for each server (ex:I get 20 servers then I will have 20 .cfg file for each server and locate them in the nagios.cfg file). And in the contact.cfg file, and in the original define contact session I put in the admin group email address.
So, I will define the contact name for each admin. So, could you tell me which session in the hosts.cfg file should I add the lines "contacts <admin contact_name>?
Regards,
Tho.
Re: Individualy server notification
You could put all contacts into a contactgroup and then set the contactgroup for each host.
http://nagios.sourceforge.net/docs/3_0/ ... ntactgroup
Or you can set the "contacts" directive for each individual host.
http://nagios.sourceforge.net/docs/3_0/ ... ntactgroup
Or you can set the "contacts" directive for each individual host.
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: Individualy server notification
Thank you all. I can make it work now.