(No output!) message
Stanley.Hopcroft at Dest.gov.au
Stanley.Hopcroft at Dest.gov.au
Wed Apr 19 01:43:17 CEST 2006
Dear Sir,
I am writing to thank you for your letter and say,
>Message: 24
>Date: Tue, 18 Apr 2006 17:47:48 +0300
>From: Brandino Andreas <mailinglist at ebox.gr>
>Subject: [Nagios-users] (No output!) message
>
>Hi all.
>I will make a question about the famous "(No output!)" error.
>
>I am trying to watch cpu usage on a cisco router.
>I am using check_snmp_load.pl from here
>http://www.manubulon.com/nagios/ind=
>ex_commands.html
>
>####### CONFIGURATION #######
>##### checkcommands.cfg
>define command {
> command_name check_snmp_cisco_cpu
> command_line $USER1$/check_snmp_load.pl -H
>$HOSTADDRESS$ -C $ARG1$ =
>-T cisco -w $ARG2$ -c $ARG3$
># comment community warning critical
>}
>
>###### services.cfg
>define service {
> name Cisco_check_cpu
> service_description CPU
> check_command
>check_snmp_cisco_cpu!my_community!30,300,30!40,40,40
> register 0
>}
>
>From=20command line, logged in as root or apache2 user, it works.
>However,
># su - nagios
>whoami
>root
>
>
>ping & snmp checks work.
>
>Any idea what can cause this error?
No but this may help,
1 If you are using embedded Perl, try calling the plugin from either a
/bin/sh or C wrapper
ie replace your command_line in checkcommands.cfg with
command_line WRAPPER $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ -C
$ARG1$ -T cisco -w $ARG2$ -c $ARG3$
WRAPPER is something like
#!/bin/sh
PLUGIN/PATH/check_snmp.pl $@
or
main(int argc, char *argv[]) {
execve("/PLUGIN/PATH/check_snmp.pl", argv) ;
}
gcc -o WRAPPER WRAPPER.c
2 Otherwise, it may be better to write a small wrapper that appends the
arguments that Nagios calls the plugins with to a file
#!/bin/sh
echo $@ >> /Some/file/writable/by/Nagios
Yours sincerely.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list