Page 1 of 1

display_name macros is not working

Posted: Sat May 19, 2012 2:54 am
by msachikanta
Hi,

I have Nagios Core 3.3.1 installed. display_name macros is not working properly in this version. Can someone help here. here is a sample configuration of host definition.

# Host definition
define host{
use linux-server
host_name 192.168.1.29
display_name My Server
contact_groups asg-support
check_interval 5
retry_interval 1
max_check_attempts 5
check_period 24x7
process_perf_data 0
retain_nonstatus_information 0
notification_period 24x7
notification_options d,u,r
alias My Server 1
}

Thanks & Regards,
Sachikanta Mishra

Re: display_name macros is not working

Posted: Mon May 21, 2012 9:45 am
by agriffin
Can you also provide the command definition which uses the macro? I think the problem is more likely to be there.

Re: display_name macros is not working

Posted: Wed May 23, 2012 3:09 pm
by msachikanta
have some doubt here... can u please tell do i need to add any command for display_name in command.cfg..? because i don't have any command entry for display_name macros. Please advise...

Regards,
Sachikanta

Re: display_name macros is not working

Posted: Fri May 25, 2012 9:56 am
by agriffin
The value for the macro is set with the display_name just as you've done. But then you need to use the macro by putting $HOSTDISPLAYNAME$ in a command definition (typically a notification command, sometimes a check command).