Page 1 of 1

Tweaking contents written to nagios.log?

Posted: Mon Feb 23, 2015 10:29 am
by JakeHatMacys
/usr/local/nagios/var/nagios.log does not seem to contain the host / service descriptions & Host Group. I was wondering if this was possible to add manually.

And on another note I don't believe Host / service Description is being Sent via the SNMP Trap Sender either. We had the same issue with Host Group not being sent via SNMP but with your guidance we got that resolved: http://support.nagios.com/forum/viewtop ... 16&t=31233

Could we do the same with the host / service descriptions to add them to the SNMP sender? I saw a Service Description Macro listed in the link on the other thread but nothing for the Host Description unless it's $HOSTNOTES$ But I'm not sure that's the right variable.

http://nagios.sourceforge.net/docs/nagi ... olist.html (link referenced from older thread)

Re: Tweaking contents written to nagios.log?

Posted: Mon Feb 23, 2015 4:37 pm
by tgriep
Are these the macros you are looking for?

Code: Select all

$HOSTALIAS$ 	Long name/description for the host. This value is taken from the alias directive in the host definition.
$SERVICEDESC$ 	The long name/description of the service (i.e. "Main Website"). This value is taken from the service_description directive of the service definition.

Re: Tweaking contents written to nagios.log?

Posted: Tue Feb 24, 2015 10:37 am
by JakeHatMacys
tgriep wrote:Are these the macros you are looking for?

Code: Select all

$HOSTALIAS$ 	Long name/description for the host. This value is taken from the alias directive in the host definition.
$SERVICEDESC$ 	The long name/description of the service (i.e. "Main Website"). This value is taken from the service_description directive of the service definition.
Yes on Service Desc. But for Host Alias it's not clear... Taken from alias directive? We're looking for the Description in Core, if that's is it then yes....
Capture.JPG
So I'd want to pull in that it's a VBS device with that macro. Is that correct?

Re: Tweaking contents written to nagios.log?

Posted: Tue Feb 24, 2015 12:26 pm
by tgriep
It is a little confusing but the $HOSTALIAS$ macro is the Description field for the host settings.