Nagios send host alert notification instead of service alert

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
raydha
Posts: 13
Joined: Thu Mar 03, 2016 12:16 am

Nagios send host alert notification instead of service alert

Post by raydha »

Hi,

We've a scenario where nagios only send host alert notification instead of service alert.
one sample is when we monitor free space and suddenly it reached the threshold limit, it send the host problem notification.
but it is actually service related issue.

regards,
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios send host alert notification instead of service a

Post by Box293 »

Can you show us the notification.

Can you provide the host and service definitions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
raydha
Posts: 13
Joined: Thu Mar 03, 2016 12:16 am

Re: Nagios send host alert notification instead of service a

Post by raydha »

notification history
xxxx D:\ Drive Space WARNING 03-14-2016 09:19:49 nagiosemail notify-host-by-email d:\ - total: 60.00 Gb - used: 55.32 Gb (92%) - free 4.68 Gb (8%)
xxxx D:\ Drive Space WARNING 03-14-2016 09:19:49 nagiosadmin notify-host-by-email d:\ - total: 60.00 Gb - used: 55.32 Gb (92%) - free 4.68 Gb (8%)


service definition
define service{
use generic-service
host_name xxxx
service_description D:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l d -w 90 -c 95
notifications_enabled 1
notification_options w,u,c,r
notification_period 24x7
notification_interval 30
}


host definition
define host{
use windows-server ; Inherit default values from a template
host_name xxxx; The name we're giving to this host
alias My xxxx ; A longer name associated with the host
address aaa.bbb.ccc.ddd ; IP address of the host
notifications_enabled 1
notification_options d,u,r,f,s
notification_period 24x7
notification_interval 30
}
raydha
Posts: 13
Joined: Thu Mar 03, 2016 12:16 am

Re: Nagios send host alert notification instead of service a

Post by raydha »

Box293 wrote:Can you show us the notification.

Can you provide the host and service definitions.
Thanks Box293. You just give me an idea.

I found this in contacts.cfg and made necessary changes.
define contact{
contact_name nagiosemail
alias Nagios eMail
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r,f
host_notification_options d,u,r,f
service_notification_commands notify-service-by-email <<<- previous is notify-host-by-email
host_notification_commands notify-host-by-email
email xxx[@]xxxx.xxx.xx
}


this has resolved my issue. Thanks again Box293.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios send host alert notification instead of service a

Post by rkennedy »

Glad to see this resolved! Going to close this thread out now, but feel free to make a new thread if you need any assistance in the future!
Former Nagios Employee
Locked