[Nagiosplug-help] Regex Nagiosgraph

domenico cosentino grouchoman at hotmail.it
Thu Apr 5 10:25:55 CEST 2012


This is my perfdata.log:
----------------------------------------------1333613914||Firenze||PING||PING OK - Packet loss = 0%, RTA = 17.65 ms||1333613923||Abilis||Controllo Usb Cell 2||SNMP OK - no(0)||1333613929||Abilis||PING||PING OK - Packet loss = 0%, RTA = 1.13 ms||1333613929||Abilis0||PING||PING OK - Packet loss = 0%, RTA = 14.14 ms||1333613930||Vtiger||PING||PING OK - Packet loss = 0%, RTA = 3.79 ms||1333613935||Abilis||Stato Cell 3||SNMP OK - disconnected(0)||1333613935||Abilis_Voghera_Sturla||VPN||SNMP OK - up(1)||1333613933||Milano||PING||PING OK - Packet loss = 0%, RTA = 16.45 ms||1333613939||Abilis1||PING||PING OK - Packet loss = 0%, RTA = 14.10 ms||1333613943||Abilis||Stato Cell 2||SNMP OK - disconnected(0)||1333613943||Abilis||Throughput_5_sec_Rx||SNMP OK - 199672||ABILIS-CPX-2-MIB::cxEthDgRxPayload5secThr.eth.4=199672c1333613947||Abilis||Uptime||SNMP OK - Timeticks: (855550540) 99 days, 0:31:45.40||1333613959||Abilis_Voghera_Sturla||VPN2||SNMP OK - up(1)||1333613965||Abilis_Voghera_Sturla||Throughput_5_min_Tx||SNMP OK - 664||ABILIS-CPX-2-MIB::cxEthDgTxPayload5minThr.eth.1=664c1333613967||Abilis||Throughput_5_min_Rx||SNMP OK - 596616||ABILIS-CPX-2-MIB::cxEthDgRxPayload5minThr.eth.4=596616c--------------------------------------------
The Regular expressions last email don't work.Thank you very much!
I'm sorry for my english













------------------------------------------------------------------------------------------------------------------------------Date: Wed, 4 Apr 2012 18:32:23 +0200
From: ck at claudiokuenzler.com
To: nagiosplug-help at lists.sourceforge.net
Subject: Re: [Nagiosplug-help] Regex Nagiosgraph

You have two possibilities:
- You parse the output line or
- You parse the perfdata

You can't take the output AND the perfdata together in the regex.

For output:

/output:SNMP OK - (\d+)/and push @s, [Payloadsec,
['data', GAUGE, $1]];

Note that you have to be very careful with this because you probably have other checks starting with the output SNMP OK....



For perfdata (Tx):
/perfdata:ABILIS-CPX-2-MIB.*TxPayload.*=(\d+).*/and push @s, [TxPayloadsec,

['data', GAUGE, $1]];

For perfdata (Rx):
/perfdata:ABILIS-CPX-2-MIB.*RxPayload.*=(\d+).*/and push @s, [RxPayloadsec,

['data', GAUGE, $1]];

For perfdata (both):
/perfdata:ABILIS-CPX-2-MIB.*Payload.*=(\d+).*/and push @s, [Payloadsec,

['data', GAUGE, $1]];



On Wed, Apr 4, 2012 at 5:24 PM, domenico cosentino <grouchoman at hotmail.it> wrote:





When I submit this check:
-----------------------------------------------------------------------------------/usr/local/nagios/libexec/check_snmp -H 79.xxx.xxx.xxx -C public -m /usr/share/snmp/mibs/abilis2.mib -o cxEthDgTxPayload5secThr.eth.1
-----------------------------------------------------------------------------------I receve this response:
-------------------------------------------------------------------------------------------------------------------------
SNMP OK - 4845272 | ABILIS-CPX-2-MIB::cxEthDgTxPayload5secThr.eth.1=4845272c
Thanks!

 		 	   		  

------------------------------------------------------------------------------

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
_______________________________________________

Nagiosplug-help mailing list

Nagiosplug-help at 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





------------------------------------------------------------------------------
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
_______________________________________________
Nagiosplug-help mailing list
Nagiosplug-help at 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 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20120405/3c4e7b63/attachment.html>


More information about the Help mailing list