Page 1 of 1

nagiosgraph snmp

Posted: Thu Aug 23, 2012 3:15 am
by mrninni
Hi,

I want to configure the map file of nagiosgraph to recognize the following SNMP response (String type)

[]# snmpget -cpublic -v2c xxx.xxx.xxx.xxx .1.3.6.1.4.1.4466.1.2.10.1.1.1.2.1.9.1392508928
SNMPv2-SMI::enterprises.4466.1.2.10.1.1.1.2.1.9.1392508928 = STRING: "8.82"


Can anyone help me?

thanks

Re: nagiosgraph snmp

Posted: Thu Aug 23, 2012 5:10 am
by mrninni
I found the solution

/output:SNMP.*?(\d+(\.\d{1,2})?)/
and push @s, [ SNMP, [ 'data', GAUGE, $1 ]];

Regards

Re: nagiosgraph snmp

Posted: Thu Aug 23, 2012 10:40 am
by slansing
Glad you found a solution. Thank you for posting it.

Re: nagiosgraph snmp

Posted: Fri Aug 24, 2012 1:16 am
by mrninni
I'd like to write a rule to retrieve some values from a string like this:

50%w 15u%c - #network_1(44/46 95%) #network_2(12/13 92%) #network_n(31/41 75%)


The rule should create 3 different rrd files:

Code: Select all

/output: ........
push @s, [network_k,
[data, GAUGE, $1] ];
where $1 is
95 for network_1
92 for network_2
75 for neteork_n

The question is: what regular expression i have to write to retrieve all the values for all the networks?

Thanks for the support