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
nagiosgraph snmp
Re: nagiosgraph snmp
I found the solution
/output:SNMP.*?(\d+(\.\d{1,2})?)/
and push @s, [ SNMP, [ 'data', GAUGE, $1 ]];
Regards
/output:SNMP.*?(\d+(\.\d{1,2})?)/
and push @s, [ SNMP, [ 'data', GAUGE, $1 ]];
Regards
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: nagiosgraph snmp
Glad you found a solution. Thank you for posting it.
Re: nagiosgraph snmp
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:
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
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] ];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