Page 1 of 1

Find all services with mails notifications enabled

Posted: Wed Apr 18, 2012 9:40 am
by pouda
Hi All,


I monitor more or less 1500 services and i would find quickly the list of services where Mail notifications is enable for a critical activities etc....

I'm not so bad in SQL but i've some difficulties to find the proper way of how these notifications are configured ...

Maybe someone can help me ?

Bye and have a nice day.

Re: Find all services with mails notifications enabled

Posted: Wed Apr 18, 2012 10:49 am
by scottwilkerson
This can be accomplished with the new CCM Beta found in the post
http://support.nagios.com/forum/viewtop ... 97&p=24253

Re: Find all services with mails notifications enabled

Posted: Thu Apr 19, 2012 2:36 am
by pouda
Hy,

Thanks for you reply, so now CCM beta is installed but i don't find the proper way where i can find all activated mail notifications on services monitored..

Can you help me please ?

Re: Find all services with mails notifications enabled

Posted: Thu Apr 19, 2012 9:36 am
by scottwilkerson
I have to apologize as I mis-read your original post. I thought you were asking for a way to enable/disable notifications for hosts/services en-masse.

There is no easy way to determine this as the type of notification in XI is managed per-user.

I can show you 2 SQL query's to see if the notification_enabled flag is set for hosts/services.

this is in the nagios MySQL database

for hosts

Code: Select all

SELECT name1 as host,notifications_enabled FROM nagios_objects,nagios_hosts WHERE objecttype_id=1 and object_id=host_object_id and is_active=1
for services

Code: Select all

SELECT name1 as host,name2 as service,notifications_enabled FROM nagios_objects,nagios_services WHERE objecttype_id=2 and object_id=service_object_id and is_active=1

Re: Find all services with mails notifications enabled

Posted: Thu Apr 19, 2012 10:43 am
by pouda
Hello,

These queries are working well BUT the result is not really the expected result.

When i get results for services i had all services with notification enabled but not MAIL notifications enabled .. i insist on the fact that i want to know on which services i activated the MAIL notifications.
notifi.jpg

Re: Find all services with mails notifications enabled

Posted: Thu Apr 19, 2012 12:22 pm
by scottwilkerson
As stated in the previous email
scottwilkerson wrote:There is no easy way to determine this as the type of notification in XI is managed per-user.