Page 1 of 1
A question about service notification without host notificat
Posted: Tue Mar 23, 2021 11:45 am
by davide.bonicelli
Hi all, i'd like to have only service notification for a number of hosts.
Because for the ping i created a service assegnated to a host group with 500 hosts, to have only one check to modified instead of 500.
To do this i've put no contact or contact group in the host Alert Setting notification page but i've put a contact group in the service under this host.
But there are no notifications from this service when it goes in red..is it possible to make a configuration like i'm trying to do?
Re: A question about service notification without host notif
Posted: Wed Mar 24, 2021 11:04 am
by vtrac
Hi,
I have test this on my VM using the "PING" service check from server1.
I then added another host (server2) to this one "PING" service.
My dashboard now displays the "PING" service on both server1 & server2.
I then shutdown server2and the "PING" service from server2went "RED", but if you look carefully at the "Attempt" column on the Service Status page, the check is only "1/5" and never runs again because now Nagios know server2is down and the "HOST" check is taking over ..... so you do not get email from this "PING" service because the settings tells Nagios to check 5 times before sending out notification.
However, once the "Attempt" column from the "HOST" status page showed "5/5", I got email notification from Nagios that server2is down.
I understand what you are trying to do, but in this case .... it is NOT worth it because the "PING" check already being handle automatically for each HOST defined in Nagios XI.
Regards,
Vinh
Re: A question about service notification without host notif
Posted: Wed Mar 24, 2021 11:14 am
by davide.bonicelli
ouch..that's no good for me..
but if i change the template that this hosts use i could have only one config to change for every hosts that uses this template without changing anything else..is it correct?
i hope because i've already done more than 500 hosts like this i don't want to modify host by host..
Re: A question about service notification without host notif
Posted: Wed Mar 24, 2021 4:40 pm
by vtrac
Hi,
Yes, that is correct.
Since all your "PING" checks came from just that ONE service, your changes can be handle ONLY from that service.
If you go Nagios XI GUI > Configure > Core Config Manager > Services
You will notice that NONE of the services have the "PING" defined but just that ONE you started out with.
Regards,
Vinh
Re: A question about service notification without host notif
Posted: Fri Mar 26, 2021 12:03 pm
by davide.bonicelli
yep but i was talking about the host check, not the service.
i've something like 500 hosts that are using the template
xiwizard_switch_host
so, if i change the default values for this template i can avoid to modified the 500 hosts one by one..is this correct?
Re: A question about service notification without host notif
Posted: Mon Mar 29, 2021 10:06 am
by vtrac
Hi,
if i change the default values for this template i can avoid to modified the 500 hosts one by one..is this correct?
Yes, if you make any changes to the template that is being used (defined) by those 500 hosts, then all 500 hosts will be affected with your change.
Regards,
Vinh
Re: A question about service notification without host notif
Posted: Mon Mar 29, 2021 10:24 am
by davide.bonicelli
i tried but i had a strange result..all the hosts went offline with a timeout error..but if i tried from the command line the result was ok..
i need to try first with a smaller group..
Re: A question about service notification without host notif
Posted: Mon Mar 29, 2021 2:12 pm
by vtrac
Yup .... best to test this on a test VM, not production.
Good luck!!