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
adding new values to nagios.log
Re: adding new values to nagios.log
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
log_external_commands=1Code: Select all
[1406152012] EXTERNAL COMMAND: ACKNOWLEDGE_HOST_PROBLEM;somehost.tld;2;1;0;Nagios Administrator;TESTFormer Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
-
sattanathan
- Posts: 23
- Joined: Tue Oct 23, 2012 8:10 am
Re: adding new values to nagios.log
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
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
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.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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.