display_name macros is not working

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
msachikanta
Posts: 58
Joined: Tue Jan 03, 2012 2:35 am

display_name macros is not working

Post 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
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: display_name macros is not working

Post by agriffin »

Can you also provide the command definition which uses the macro? I think the problem is more likely to be there.
msachikanta
Posts: 58
Joined: Tue Jan 03, 2012 2:35 am

Re: display_name macros is not working

Post 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
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: display_name macros is not working

Post 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).
Locked