Page 1 of 1
adding new values to nagios.log
Posted: Wed Jul 23, 2014 10:35 am
by sattanathan
Hi,
I am in need of finding the notification status(acknowledged) for the service/host alert that are generated and logged in nagios.log .
Please let me know can we add $NOTIFICATIONTYPE$ macro to nagios.log
Thanks,
Sattanathan.S
Re: adding new values to nagios.log
Posted: Wed Jul 23, 2014 4:48 pm
by abrist
You should get ack in logs if you enabled the logging of external commands in nagios.cfg:
You should then see a line similar to the following for acks in your nagios.log:
Code: Select all
[1406152012] EXTERNAL COMMAND: ACKNOWLEDGE_HOST_PROBLEM;somehost.tld;2;1;0;Nagios Administrator;TEST
Re: adding new values to nagios.log
Posted: Thu Jul 24, 2014 5:11 am
by sattanathan
Hi Abrist,
Thanks..
But still i need to have the notification status along with the service alert / host alert (as shown in the below example) that are being logged in nagios.log
Original service alert in nagios.log
[1405473494] SERVICE ALERT: somehost ;Net-SNMP - critical processes;CRITICAL;HARD;3;SNMP-PROCS CRITICAL - nagios: OK - 9 processess
my requirement to be in nagios.log
[1405473494] SERVICE ALERT: somehost ;Net-SNMP - critical processes;CRITICAL;HARD;3;SNMP-PROCS CRITICAL - nagios: OK - 9 processess;ACKNOWLEDGE_HOST_PROBLEM;somehost;2;1;0;Nagios Administrator;TEST
Regards,
Sattanathan.S
Re: adding new values to nagios.log
Posted: Thu Jul 24, 2014 12:33 pm
by abrist
sattanathan wrote:[1405473494] SERVICE ALERT: somehost ;Net-SNMP - critical processes;CRITICAL;HARD;3;SNMP-PROCS CRITICAL - nagios: OK - 9 processess;ACKNOWLEDGE_HOST_PROBLEM;somehost;2;1;0;Nagios Administrator;TEST
These are technically 2 different metaphysical objects. One is a "Service Alert" while the other is an "External Command". You would have to modify the
nagios source to change how this logs.