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<br><br><div class="gmail_quote">
On Wed, Oct 14, 2009 at 8:18 AM, Duncan Ferguson <span dir="ltr"><<a href="mailto:duncan.ferguson@opsera.com">duncan.ferguson@opsera.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><br><div><div class="im"><div>On 13 Oct 2009, at 19:01, shadih rahman wrote:</div><br><blockquote type="cite">All,<br>   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.<br>
 <br><br>argument section<br><br>$plugin->add_arg(<br>    spec       => 'protocol|P=s',<br>    help       => [<br>    "snmp protocol",<br>    ],<br>    label      => [ 'protocol'],<br>
     default    => [ '2c' ],<br>    required   => 0,<br>);<br></blockquote><div><br></div></div>Remove the [ ]'s, i.e.</div><div class="im"><div><br></div><div>$plugin->add_arg(<br>    spec       => 'protocol|P=s',<br>
    help       => 'snmp protocol',<br>    label      => 'protocol',<br>    default    => '2c' ,<br>    required   => 0,<br>);</div><div><br></div></div><div><span style="font-family: Helvetica,sans-serif;">  Duncs</span></div>
<div><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">
<font color="#4a0b71" face="Arial" size="4"><span style="font-size: 16px;"><span style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px;"><div style="margin: 0cm 0cm 0.0001pt;"><font color="#4a0b71" face="Helvetica" size="3"><span style="font-size: 12px;"><span style="color: rgb(0, 0, 0);"><div>
<div><span style="font-family: Calibri; font-size: 15px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><font color="#4a0b71" face="Arial" size="4"><span style="font-size: 16px;"><span style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px;"><div style="margin: 0cm 0cm 0.0001pt;">
<font color="#4a0b71"><font face="Helvetica" size="3"><span style="color: rgb(0, 0, 0);"><div> <br>-- </div><div><div><span style="font-family: Calibri; font-size: 15px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">
<font color="#4a0b71" face="Arial" size="4"><span style="font-size: 16px;"><span style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px;"><div style="margin: 0cm 0cm 0.0001pt;"><font color="#4a0b71" face="Helvetica" size="3"><span style="color: rgb(0, 0, 0);"><div>
<div><span style="font-family: Calibri; font-size: 15px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><font color="#4a0b71" face="Arial" size="4"><span style="font-size: 16px;"><span style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">
<span style="font-size: 12pt; font-family: Arial,sans-serif; color: rgb(74, 11, 113);" lang="EN-GB">Duncan Ferguson</span><span style="font-size: 14pt; font-family: Arial,sans-serif; color: rgb(74, 11, 113);" lang="EN-GB"><br>
</span><span style="font-size: 10pt; font-family: Arial,sans-serif; color: rgb(74, 11, 113);">Senior Developer</span></div></span></span></font></div></span></div></div></span></font></div></span></span></font></div></span></div>
</div></span></font></font></div></span></span></font></div></span></div></div></span></span></font></div></span></span></font></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">
<span></span><span></span><span></span><span></span><br><span></span><span><img src="cid:image001.gif@01C9231E.D8AA72D0" height="33" width="100"></span><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Calibri; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><span style="font-size: 9pt; font-family: Arial,sans-serif; color: rgb(74, 11, 113);" lang="EN-GB"><br>
<br>Opsera Limited | Unit 69 Suttons Business Park<br>Reading | Berkshire | RG6 1AZ | UK<b><br><br>Phone:   </b>+44 (0) 845 057 7887<br><b>Mobile</b></span><b><span style="font-size: 9pt; font-family: 'Times New Roman',serif; color: rgb(74, 11, 113);" lang="EN-GB">:   </span></b><span style="font-size: 9pt; font-family: Arial,sans-serif; color: rgb(74, 11, 113);" lang="EN-GB">+44 (0) 7968 148 748<br>
<b>Skype</b>:   duncan_j_ferguson     <b>Email:</b>   </span><u><span style="font-size: 9pt; font-family: Arial,sans-serif; color: rgb(74, 11, 113);" lang="EN-GB"><a href="mailto:duncan.ferguson@opsera.com" style="color: blue; text-decoration: underline;" target="_blank">duncan.ferguson@opsera.com</a></span></u><b><span style="font-size: 10pt; font-family: Arial,sans-serif;"><br>
</span></b><span style="font-size: 9pt; font-family: Arial,sans-serif; color: rgb(74, 11, 113);" lang="EN-GB"><span style="color: rgb(74, 11, 113);"><a href="http://www.opsera.com/" title="http://www.opsera.com" style="color: blue; text-decoration: underline;" target="_blank">www.opsera.com</a></span></span></span></span></span></span></span></span></span></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;"><font face="Arial" size="3"><span style="font-size: 12px;"><font color="#c0c0c0"><br></font></span></font></div><div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri,sans-serif;">
<font face="Arial" size="3"><span style="font-size: 12px;"><span style="font-size: 13px;"><span style="background-color: transparent;"><font color="#c0c0c0">Opsera Limited is registered in the </font></span><span style="background-color: transparent;"><font color="#c0c0c0">UK</font></span><span style="background-color: transparent;"><font color="#c0c0c0"> under Company Number 5396532. Our registered office is Gorse View, Horsell Rise, Woking, </font></span><span style="background-color: transparent;"><font color="#c0c0c0">Surrey</font></span><span style="background-color: transparent;"><font color="#c0c0c0">, </font></span><span style="background-color: transparent;"><font color="#c0c0c0">GU21 4RB</font></span><span style="background-color: transparent;"><font color="#c0c0c0">.</font></span></span></span></font></div>
</span> </div></span></span></span></div><br></div><br>------------------------------------------------------------------------------<br>
Come build with us! The BlackBerry(R) Developer Conference in SF, CA<br>
is the only developer event you need to attend this year. Jumpstart your<br>
developing skills, take BlackBerry mobile applications to market and stay<br>
ahead of the curve. Join us from November 9 - 12, 2009. Register now!<br>
<a href="http://p.sf.net/sfu/devconference" target="_blank">http://p.sf.net/sfu/devconference</a><br>_______________________________________________________<br>
Nagios Plugin Development Mailing List <a href="mailto:Nagiosplug-devel@lists.sourceforge.net">Nagiosplug-devel@lists.sourceforge.net</a><br>
Unsubscribe at <a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel</a><br>
::: Please include plugins version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br><br clear="all"><br>-- <br>Cordially,<br>Shadhin Rahman<br>