check_log2.pl gives no output

Anton Kornexl Anton.Kornexl at rz.uni-passau.de
Mon Mar 7 13:52:06 CET 2005


Tharanga wrote:
> Hi,
>  
> Iam usig a plugin to check my syslogs.all remote hosts syslogs are 
> redirect to my nagios server and on that sever iam running the 
> check_log2.pl  script. if  i used that in command line its workign fine. 
> but if i put that to nagios it gives no output error (iam cheking the 
> "syslog" key word to just chek the result)
> in my checkcomands.cfg i defined it as follws
>  
> define command {
> command_name check_log2
> command_line $USER1$/check_log2.pl -l /var/log/syslog -s /tmp/seek -p syslog
> }
>  

I had the same problem (with embedded Perl interpreter)
Enclose the check_log2.pl in a shell command file and use this command file as plugin
# 'check_warn_log' command definition
define command{
          command_name    check_warn_log
#       command_line    $USER1$/check_log2.pl -l /var/log/warn -s /tmp/warn.seek -p $ARG1$
          command_line    $USER1$/debug_plugin.sh -l /var/log/warn -s /tmp/warn.seek -p $ARG1$
          }


---- debug_plugin.sh ----
#!/bin/bash
/usr/lib/nagios/plugins/check_log2.pl $*
exit $?

-- 
Anton Kornexl




-------------- next part --------------
A non-text attachment was scrubbed...
Name: Anton.Kornexl.vcf
Type: text/x-vcard
Size: 114 bytes
Desc: not available
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050307/6fffd6b2/attachment.vcf>


More information about the Users mailing list