All the contacts are having this issue, but this the contacts definition:
Code: Select all
define contact {
contact_name rbozdog
use generic-contact
alias Rares Bozdog
service_notification_period 24x7
host_notification_period 24x7
service_notification_options c,r
host_notification_options d,r
service_notification_commands notify-host-by-email
host_notification_commands notify-service-by-email
email rbozdog@mail.com
}
Also the contact tempate:
Code: Select all
define contact {
name generic-contact ; The name of this contact template
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 0 ; DON'T REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
}
And the contact groups:
Code: Select all
define contactgroup {
contactgroup_name admins
alias Nagios Administrators
members rbozdog
}
For every state is this problem so I sent a costum notification:
Code: Select all
[1550679657.801291] [2048.1] [pid=28645] **** BEGIN MACRO PROCESSING ***********
[1550679657.801298] [2048.1] [pid=28645] Processing: 'HOST NOTIFICATION: rbozdog;HOSTNAME;CUSTOM ($HOSTSTATE$);notify-service-by-email;$HOSTOUTPUT$;$NOTIFICATIONAUTHOR$;$NOTIFICATIONCOMMENT$
'
[1550679657.801312] [2048.1] [pid=28645] Done. Final output: 'HOST NOTIFICATION: rbozdog;HOSTNAME;CUSTOM (UP);notify-service-by-email;PING OK - Packet loss = 0%, RTA = 43.18 ms;RBozdog;test
'
[1550679657.801319] [2048.1] [pid=28645] **** END MACRO PROCESSING *************
The e-mail notification:
Code: Select all
***** Nagios *****
Notification Type: CUSTOM
Service: $
Host: ALIAS
Address: 0.0.0.0
State: $
Date/Time: Wed Feb 20 18:38:43 EET 2019
Additional Info:
$
The e-mail subject:
Code: Select all
** CUSTOM Service Alert: ALIAS/$ is $ **
I can see in the debug that is as you said, the service is processed as a host notification, but what is the solution?
Thank you!