Announcement

Collapse
No announcement yet.

/libexec/traps/TrapHandler not sending external commands during traps

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • /libexec/traps/TrapHandler not sending external commands during traps

    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:

    Code:
    my $submit = `/bin/echo "[$datetime] PROCESS_SERVICE_CHECK_RESULT;$this_host;$this_service;$status;$arguments_line" >> $conf[0]`;
    to

    Code:
    my $submit = `/bin/echo "[$datetime] PROCESS_SERVICE_CHECK_RESULT;$this_host;$this_service;$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
    Last edited by nebj00la; 30 October 2007, 21:41.

  • #2
    The issue was due to the "echo" binary missing from /bin. For whatever reason, there was a zero byte size "echo" file which I replaced with the proper binary.

    Thanks,
    nebj00la

    Comment

    Working...
    X