Hi,
I am having time configuring alerts for multiple groups in Nagios. I configured new users in contacts.cfg and new groups including those users. I also added notifications groups to the template I use. However, alerts are going to nagios admins only. Any help is appreciated!
alerts for multiple groups
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: alerts for multiple groups
If you define the contacts or contact_groups at a template level, are you also defining additional contacts or contact_groups on the object as well?
Can you please provide:
The host definition, any templates it uses and and templates the templates use
The service definition, any templates it uses and and templates the templates use
The contact definition, any templates it uses and and templates the templates use
The contact group definition
Also, be very specific about who the alerts are working for and not working for and if this is at the host or service level.
Can you please provide:
The host definition, any templates it uses and and templates the templates use
The service definition, any templates it uses and and templates the templates use
The contact definition, any templates it uses and and templates the templates use
The contact group definition
Also, be very specific about who the alerts are working for and not working for and if this is at the host or service level.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: alerts for multiple groups
Thanks for jumping on this issues! These are my configs:
host
template object (I just found out that template specifies to contact sys-admins)
service definition hostname is
contact definition
contact group
host
Code: Select all
define host{
host_name test
use linux-server
hostgroups jenkins-masters-test
alias test
address 10.17.3.169
check_command check-host-alive
check_interval 10.17.3.169
retry_interval 2
max_check_attempts 2
check_period 24x7
process_perf_data 0
retain_nonstatus_information 0
notification_interval 0
notification_period 24x7
notification_options d,u,r
}
Code: Select all
define host{
name linux-server ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
hostgroups critical-linux-servers
check_period 24x7 ; By default, Linux hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each Linux host 10 times (max)
check_command check-host-alive,check_local_disk,check_local_load ; Default command to check Linux hosts
notification_period 24x7 ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 10 ; Resend notifications every 2 hours
notification_options d,u,r,f,s ; Only send notifications for specific host states
contact_groups sys-admins ; Notifications get sent to the admins by default
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
Code: Select all
define service{
use generic-service ; Inherit default values from a template
hostgroup_name critical-linux,jenkins-masters-qe,build-masters,qe-linux-slaves,web-services,qe-xen-servers,perf-servers,qe-vm
host_name wiki,test
service_description SSH Check
check_command check_ssh
}
Code: Select all
define contact{
contact_name pl33g0r
alias pl33g0r
email [email protected]
service_notification_period 24x7 ; service notifications can be sent anytime
host_notification_period 24x7 ; host notifications can be sent anytime
service_notification_options w,u,c,r,f,s ; send notifications for all service states, flapping events, and scheduled downtime events
host_notification_options d,u,r,f,s ; send notifications for all host states, flapping events, and scheduled downtime events
service_notification_commands notify-service-by-email ; send service notifications via email
host_notification_commands notify-host-by-email ; send host notifications via email
register 1 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
}
Code: Select all
define contactgroup{
contactgroup_name it-test
alias IT test
members pl33g0r
}
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: alerts for multiple groups
The only place I am seeing contacts or contact groups being assigned is in the linux-server host template.
I don't see anywhere in your definitions the contact group it-test being used.
I don't see anywhere in your definitions the contact group it-test being used.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: alerts for multiple groups
I guess in this case scenario, it would be better not use any inherited templates and create a completely new one that has nothing inherited. Does it make sense?
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: alerts for multiple groups
Using multiple templates is OK, as each template setting can be defined to inherit or block the previous templates.
Have a look in this article where it talks about additive inheritance.
https://assets.nagios.com/downloads/nag ... tance.html
Have a look in this article where it talks about additive inheritance.
https://assets.nagios.com/downloads/nag ... tance.html
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.