nagiosgraph snmp

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
mrninni
Posts: 27
Joined: Tue Sep 27, 2011 8:35 am

nagiosgraph snmp

Post 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
mrninni
Posts: 27
Joined: Tue Sep 27, 2011 8:35 am

Re: nagiosgraph snmp

Post by mrninni »

I found the solution

/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

Post by slansing »

Glad you found a solution. Thank you for posting it.
mrninni
Posts: 27
Joined: Tue Sep 27, 2011 8:35 am

Re: nagiosgraph snmp

Post 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
Locked