Hi,
I have just configured email notification for Status Alerts.
I have a continuous WARNING being reported for low disk space on a Windows server. This is fine, there is still 20GB left and more for testing the notifications.
It reports the warning perfectly fine apart from the $HOSTNAME$, instead it reports the $HOSTALIAS$.
This is how the email notification looks;
***** Nagios *****
Notification Type: PROBLEM
Service: C:\ Drive Space
Host: EBe****** Dev
Address: xx.xx.xx.xxx
State: WARNING
Date/Time: Tue Apr 1 08:06:35 BST 2014
Additional Info:
c:\ - total: 29.99 Gb - used: 24.17 Gb (81%) - free 5.82 Gb (19%)
This is the host definition;
define host{
use windows-server ; Inherit default values from a template
host_name SV****76 ; The name we're giving to this host
alias EBe****** Dev ; A longer name associated with the host
address xx.xx.xx.xxx ; IP address of the host
hostgroups iis-servers ; The group this server is a member of
notes EBe****** Dev ; Show application name in Extended Information Screen
}
Anyone have any ideas?
I'm running Nagios 3.5.1 by the way.
Much Appreciated,
**** Update ****
Just received an alert and noticed this in the nagios.log file;
[1396339595] SERVICE NOTIFICATION: craig;SV****76;C:\ Drive Space;WARNING;notify-service-by-email;c:\ - total: 29.99 Gb - used: 24.17 Gb (81%) - free 5.82 Gb (19%)
$HOSTNAME$ Incorrect in Email Notification
-
peakyblinder
- Posts: 63
- Joined: Tue Mar 25, 2014 4:39 am
Re: $HOSTNAME$ Incorrect in Email Notification
Your notification command most likely uses the $HOSTALIAS$ macro instead of the $HOSTNAME$ macro. Can you post your notification handler (notify-*-by-email) commands?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
peakyblinder
- Posts: 63
- Joined: Tue Mar 25, 2014 4:39 am
Re: $HOSTNAME$ Incorrect in Email Notification
Yup, my bad. Service and host email notification was using different macros.abrist wrote:Your notification command most likely uses the $HOSTALIAS$ macro instead of the $HOSTNAME$ macro. Can you post your notification handler (notify-*-by-email) commands?
Re: $HOSTNAME$ Incorrect in Email Notification
Safe to lock up the thread now?
Former Nagios employee
-
peakyblinder
- Posts: 63
- Joined: Tue Mar 25, 2014 4:39 am
Re: $HOSTNAME$ Incorrect in Email Notification
Yeah, can close this off now. Thanks,tmcdonald wrote:Safe to lock up the thread now?