nebj00la
10-26-2007, 07:58 AM
Hi,
Recently my traps stopped being sent as external commands to the nagios.cmd file. The snmptt.log file shows the traps are being received, yet they never get sent as external commands.
In order to see if the script was even working, within /libexec/traps/TrapHandler I changed:
my $submit = `/bin/echo "[$datetime] PROCESS_SERVICE_CHECK_RESULT;$this_host;$this_serv ice;$status;$arguments_line" >> $conf[0]`;
to
my $submit = `/bin/echo "[$datetime] PROCESS_SERVICE_CHECK_RESULT;$this_host;$this_serv ice;$status;$arguments_line" >> test.txt
test.txt was created within minutes, so I know the script is being called when a trap is received. The problem is nothing being sent to the nagios command file.
Any comments or help would be greatly appreciated.
Thanks,
nebj00la
Recently my traps stopped being sent as external commands to the nagios.cmd file. The snmptt.log file shows the traps are being received, yet they never get sent as external commands.
In order to see if the script was even working, within /libexec/traps/TrapHandler I changed:
my $submit = `/bin/echo "[$datetime] PROCESS_SERVICE_CHECK_RESULT;$this_host;$this_serv ice;$status;$arguments_line" >> $conf[0]`;
to
my $submit = `/bin/echo "[$datetime] PROCESS_SERVICE_CHECK_RESULT;$this_host;$this_serv ice;$status;$arguments_line" >> test.txt
test.txt was created within minutes, so I know the script is being called when a trap is received. The problem is nothing being sent to the nagios command file.
Any comments or help would be greatly appreciated.
Thanks,
nebj00la