[Nagiosplug-devel] nagios plugin question

shadih rahman shadhin71 at gmail.com
Thu Oct 15 06:23:24 CEST 2009


Thanks for your help.   Just wanted to let you know Nagios::Object module
has a bug regarding nagios version 3.   It does not work with
serviceescalation.  If you are interested I can submit the patch.  Thanks

On Wed, Oct 14, 2009 at 8:18 AM, Duncan Ferguson <duncan.ferguson at opsera.com
> wrote:

>
> On 13 Oct 2009, at 19:01, shadih rahman wrote:
>
> All,
>    I am trying to define an argument in plugin with default value.  However
> whenever I give the argument a default value then it creates an array
> instead of scalar variable.  can someone please tell me how to define a
> default value for an argument which can be accessed as a scalar?  Thanks in
> advance.
>
>
> argument section
>
> $plugin->add_arg(
>     spec       => 'protocol|P=s',
>     help       => [
>     "snmp protocol",
>     ],
>     label      => [ 'protocol'],
>     default    => [ '2c' ],
>     required   => 0,
> );
>
>
> Remove the [ ]'s, i.e.
>
> $plugin->add_arg(
>     spec       => 'protocol|P=s',
>     help       => 'snmp protocol',
>     label      => 'protocol',
>     default    => '2c' ,
>     required   => 0,
> );
>
>   Duncs
>
> --
> Duncan Ferguson
> Senior Developer
>
>
>
> Opsera Limited | Unit 69 Suttons Business Park
> Reading | Berkshire | RG6 1AZ | UK*
>
> Phone:   *+44 (0) 845 057 7887
> *Mobile**:   *+44 (0) 7968 148 748
> *Skype*:   duncan_j_ferguson     *Email:*   *duncan.ferguson at opsera.com**
> *www.opsera.com
>
> Opsera Limited is registered in the UK under Company Number 5396532. Our
> registered office is Gorse View, Horsell Rise, Woking, Surrey, GU21 4RB.
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________________
> Nagios Plugin Development Mailing List
> Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>



-- 
Cordially,
Shadhin Rahman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20091015/21a3b031/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.gif
Type: image/gif
Size: 749 bytes
Desc: not available
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20091015/21a3b031/attachment.gif>


More information about the Devel mailing list