Page 1 of 1

Host Template showing up as host alias in notification

Posted: Thu May 14, 2015 8:20 am
by brdr
Hi,

We have XI 2014R2.3.

Below is email notification. It is default Email Settings using service notification command 'xi_service_notification_handler'. The only change is the we are using 'hostalias' where is says host in the email. For some reason if the host alias ('Description' field for Host in CCM) is blank the descript of the host template is being inserted in field hostalias. Is this by design?

---
From: noreply-nagios
Sent: Thursday, May 14, 2015 9:10 AM
To: xxxx xxxxxx
Subject: RECOVERY Service Alert - netdevice_01/_Hardware Environmentals is OK

***** Nagios XI Alert *****

Nagios has detected this service has recovered.

Notification Type: RECOVERY

Service: _Hardware Environmentals
Host: Network Device Host Template
Address: x.x.x.x
State: OK
Info: I am a Cisco IOS Software, Catalyst L3 Switch Software (CAT3K_CAA-UNIVERSALK9-M), Version 15.0(1)EX3, RELEASE SOFTWARE (fc2)
Date/Time: 2015-05-14 09:10:04

Respond: http://nagioshost/nagiosxi/rr.php?uid=6 ... 93b699ea41
Nagios URL: http:/nagioshost/nagiosxi/

Re: Host Template showing up as host alias in notification

Posted: Thu May 14, 2015 10:34 am
by lmiltchev
I believe if the alias is not set (if it is blank), you should see "alias" in the email notification. For example, in my notification options I have:

Code: Select all

Host Name: %host%
Hostalias: %hostalias%
Without alias

In the CCM:

Code: Select all

Host Name: localhost
Description: <blank>
In the email notification:

Code: Select all

Host Name: localhost
Hostalias: alias
With alias

In the CCM:

Code: Select all

Host Name: localhost
Description: TEST
In the email notification:

Code: Select all

Host Name: localhost
Hostalias: TEST

Re: Host Template showing up as host alias in notification

Posted: Fri May 15, 2015 7:57 am
by brdr
What happens when you do 'without alias' for the host your testing, and this host uses a template with a description of 'Host Template'? Does it still show as 'alias' or 'Host Template' in the email notification?

Thx

Re: Host Template showing up as host alias in notification

Posted: Fri May 15, 2015 9:05 am
by jdalrymple
brdr - I wouldn't even call this "by design" it's just logical. Templates are just like regular hosts and the definitions stack upon one another. If you don't specify explicitly a definition in a host it will inherit it from the parent template.

What would you like to see become the alias of a host if you didn't explicitly set it?

Re: Host Template showing up as host alias in notification

Posted: Fri May 15, 2015 10:07 am
by brdr
I dunno. Fo now, when I train the other users here that are entering hosts and using templates that the description of the host should be present, if not, they will get the description of the template if present in email notification. Plz lock. Thx.

Re: Host Template showing up as host alias in notification

Posted: Fri May 15, 2015 10:09 am
by jdalrymple
Locking now - just one last addition. You might want to change your lowest level templates "alias" definition to be something like "Log into CCM and change this host's Alias" or something to remind your users.

Hope this helped.