[Nagiosplug-help] Regex Nagiosgraph

Claudio Kuenzler ck at claudiokuenzler.com
Wed Apr 4 18:32:23 CEST 2012


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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20120404/930b7bfa/attachment.html>


More information about the Help mailing list