You have two possibilities:<br>- You parse the output line or<br>- You parse the perfdata<br><br>You can't take the output AND the perfdata together in the regex.<br><br>For output:<br><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">/output:SNMP OK - (\d+)/</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">and push @s, [Payloadsec,</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">['data', GAUGE, $1]];</span><br><br>Note that you have to be very careful with this because you probably have other checks starting with the output SNMP OK....<br><br>
<br>For perfdata (Tx):<br><span style="font-family:courier new,monospace">/perfdata:ABILIS-CPX-2-MIB.*TxPayload.*=(\d+).*/</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">and push @s, [TxPayloadsec,</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
['data', GAUGE, $1]];</span><br><br>For perfdata (Rx):<br><span style="font-family:courier new,monospace">/perfdata:ABILIS-CPX-2-MIB.*RxPayload.*=(\d+).*/</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">and push @s, [RxPayloadsec,</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
['data', GAUGE, $1]];</span><br><br>For perfdata (both):<br><span style="font-family:courier new,monospace">/perfdata:ABILIS-CPX-2-MIB.*Payload.*=(\d+).*/</span><br style="font-family:courier new,monospace"><span style="font-family:courier new,monospace">and push @s, [Payloadsec,</span><br style="font-family:courier new,monospace">
<span style="font-family:courier new,monospace">
['data', GAUGE, $1]];</span><br><br><br><br><div class="gmail_quote">On Wed, Apr 4, 2012 at 5:24 PM, domenico cosentino <span dir="ltr"><<a href="mailto:grouchoman@hotmail.it">grouchoman@hotmail.it</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div dir="ltr">
When I submit this check:<br><div>-----------------------------------------------------------------------------------</div><div>/usr/local/nagios/libexec/check_snmp -H 79.xxx.xxx.xxx -C public -m /usr/share/snmp/mibs/abilis2.mib -o cxEthDgTxPayload5secThr.eth.1</div>
<div>-----------------------------------------------------------------------------------</div><div>I receve this response:</div><div><br></div><div>-------------------------------------------------------------------------------------------------------------------------</div>
<div>SNMP OK - 4845272 | ABILIS-CPX-2-MIB::cxEthDgTxPayload5secThr.eth.1=4845272c</div><div><div></div><hr><br>Thanks!</div><div><br></div><div><br></div> </div></div>
<br>------------------------------------------------------------------------------<br>
Better than sec? Nothing is better than sec when it comes to<br>
monitoring Big Data applications. Try Boundary one-second<br>
resolution app monitoring today. Free.<br>
<a href="http://p.sf.net/sfu/Boundary-dev2dev" target="_blank">http://p.sf.net/sfu/Boundary-dev2dev</a><br>_______________________________________________<br>
Nagiosplug-help mailing list<br>
<a href="mailto:Nagiosplug-help@lists.sourceforge.net">Nagiosplug-help@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagiosplug-help" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagiosplug-help</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>
<br></blockquote></div><br>