<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
This is my perfdata.log:<div><br><div>----------------------------------------------</div><div><div>1333613914||Firenze||PING||PING OK - Packet loss = 0%, RTA = 17.65 ms||</div><div>1333613923||Abilis||Controllo Usb Cell 2||SNMP OK - no(0)||</div><div>1333613929||Abilis||PING||PING OK - Packet loss = 0%, RTA = 1.13 ms||</div><div>1333613929||Abilis0||PING||PING OK - Packet loss = 0%, RTA = 14.14 ms||</div><div>1333613930||Vtiger||PING||PING OK - Packet loss = 0%, RTA = 3.79 ms||</div><div>1333613935||Abilis||Stato Cell 3||SNMP OK - disconnected(0)||</div><div>1333613935||Abilis_Voghera_Sturla||VPN||SNMP OK - up(1)||</div><div>1333613933||Milano||PING||PING OK - Packet loss = 0%, RTA = 16.45 ms||</div><div>1333613939||Abilis1||PING||PING OK - Packet loss = 0%, RTA = 14.10 ms||</div><div>1333613943||Abilis||Stato Cell 2||SNMP OK - disconnected(0)||</div><div>1333613943||Abilis||Throughput_5_sec_Rx||SNMP OK - 199672||ABILIS-CPX-2-MIB::cxEthDgRxPayload5secThr.eth.4=199672c</div><div>1333613947||Abilis||Uptime||SNMP OK - Timeticks: (855550540) 99 days, 0:31:45.40||</div><div>1333613959||Abilis_Voghera_Sturla||VPN2||SNMP OK - up(1)||</div><div>1333613965||Abilis_Voghera_Sturla||Throughput_5_min_Tx||SNMP OK - 664||ABILIS-CPX-2-MIB::cxEthDgTxPayload5minThr.eth.1=664c</div><div>1333613967||Abilis||Throughput_5_min_Rx||SNMP OK - 596616||ABILIS-CPX-2-MIB::cxEthDgRxPayload5minThr.eth.4=596616c</div>--------------------------------------------</div><div><br></div><div>The Regular expressions last email don't work.</div><div>Thank you very much!</div><div><br></div><div>I'm sorry for my english</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div>------------------------------------------------------------------------------------------------------------------------------</div><div><div>Date: Wed, 4 Apr 2012 18:32:23 +0200<br>From: ck@claudiokuenzler.com<br>To: nagiosplug-help@lists.sourceforge.net<br>Subject: Re: [Nagiosplug-help] Regex Nagiosgraph<br><br>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="ecxgmail_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="ecxgmail_quote" style="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>
<br>------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev<br>_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null</div></div></div>                                        </div></body>
</html>