Nag 3.0b6 - differences in instantiation of $ARG$ macros to 2.9 ? [SEC=UNCLASSIFIED]

Stanley.Hopcroft at Dest.gov.au Stanley.Hopcroft at Dest.gov.au
Thu Nov 8 06:27:59 CET 2007


Dear Folks,

A quick look at the docco (on Nagios.ORG eg what's new, upgrading from
2.x) suggests there is no significant change in the processing of the
$ARG$ macros in 3.0 (3.0b6) compared to 2.9.

Unfortunately, my Perl plugins fail to run under 3.0 when the plugin is
defined (in checkcommands.cfg) with a $ARG1$ macro but called without a
value for the macro.

It appears that under 3.0 the ARG macro is instantiated with a Perl
'undef' value (that's my guess given the exception it raises), so
perhaps the macro is set to a empty string by the C caller.

What the problem is not: -

1 Embedded Perl: plugin runs fine under the new_mini_epn emulator

2 The plugin works fine when called by Nagios with non-null args.

The error is raisd by a standard (ie part of the Perl 5 distribution)
module called Getopt::Long. Since this is a widely used module, it is
unlikely to be a bug in that module.

Here are the error messages

[1194424952] SERVICE ALERT: foo;Reachability of bar/192.168.95.115 from
foo router;UNKNOWN;HARD;3;**ePN
/usr/lib/nagios/plugins/check_dev_plr_question: "Use of uninitialized
value in string eq at /usr/lib/perl5/5.8.0/Getopt/Long.pm line 407,".

[1194469202] SERVICE ALERT: MTASW200;acmms003 has joined multicast
group.;UNKNOWN;SOFT;1;**ePN /usr/lib/nagios/plugins/check_mcast: "Use of
uninitialized value in string eq at /usr/lib/perl5/5.8.0/Getopt/Long.pm
line 407,".

command_line    $USER1$/check_dev_plr_question -R $HOSTNAME$ $ARG1$

# BAD
check_command                    check_dev_plr_question
# OK
check_command                    check_dev_plr_question!-t 1.1.1.2 -T 20
-A "size 1427 df-bit"
check_command                    check_dev_plr_question!-A "size 1500
repeat 1000 source Gi0/1" -T 20

I can prob work around by changing my check_command entries to 

check_dev_question!" " or some such thing.

Thank you,

Yours sincerely.

Classification: UNCLASSIFIED

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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