Trouble graphing with custom snmpd.conf extend script...

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
svavaroe
Posts: 3
Joined: Thu Feb 04, 2010 4:36 am

Trouble graphing with custom snmpd.conf extend script...

Post by svavaroe »

Hello.
I was hoping someone could help me out with this.

I have configured a custom script to be executed in snmpd.conf.
The script only returns current concurrent connections from conntrack table in iptables(netfilter).

The Script :

Code: Select all

#!/bin/bash
cat /proc/sys/net/netfilter/nf_conntrack_count
It usually returns a number between 5000 - 15000.

My snmpd.conf is configured as :

Code: Select all

extend .1.3.6.1.3.19811018.30 conntrack_count /etc/snmp/ip_conntrack.sh
There seems to be no problem retrieving this information with snmpwalk.

Code: Select all

snmpwalk -c public -v1 IP_ADDRESS .1.3.6.1.3.19811018.30
SNMPv2-SMI::experimental.19811018.30.1.0 = INTEGER: 1
SNMPv2-SMI::experimental.19811018.30.2.1.2.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = STRING: "/etc/snmp/ip_conntrack.sh"
SNMPv2-SMI::experimental.19811018.30.2.1.3.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = ""
SNMPv2-SMI::experimental.19811018.30.2.1.4.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = ""
SNMPv2-SMI::experimental.19811018.30.2.1.5.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = INTEGER: 5
SNMPv2-SMI::experimental.19811018.30.2.1.6.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = INTEGER: 1
SNMPv2-SMI::experimental.19811018.30.2.1.7.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = INTEGER: 1
SNMPv2-SMI::experimental.19811018.30.2.1.20.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = INTEGER: 4
SNMPv2-SMI::experimental.19811018.30.2.1.21.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = INTEGER: 1
SNMPv2-SMI::experimental.19811018.30.3.1.1.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = STRING: "6252"
SNMPv2-SMI::experimental.19811018.30.3.1.2.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = STRING: "6252"
SNMPv2-SMI::experimental.19811018.30.3.1.3.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = INTEGER: 1
SNMPv2-SMI::experimental.19811018.30.3.1.4.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116 = INTEGER: 0
SNMPv2-SMI::experimental.19811018.30.4.1.2.15.99.111.110.110.116.114.97.99.107.95.99.111.117.110.116.1 = STRING: "6252"
But when I graph it with a generic snmpd oid in cacti I allways get a graph that looks like this :

Image

e.g. it has M as megabyte and K as Kilobyte. As I am not graphinc traffic, only numbers. How can I change this to display numbers correctly ?

Is the problem that this OID is returned as STRING, but not INTEGER ?

Thanks allot.
Best regards,

Svavar - Reykjavik - Iceland
svavaroe
Posts: 3
Joined: Thu Feb 04, 2010 4:36 am

Post by svavaroe »

anyone ? :-?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Cacti turns strings to integer automatically. You can tweak the y-axis to display differently, see rrdtool_graph manual.
R.
svavaroe
Posts: 3
Joined: Thu Feb 04, 2010 4:36 am

Post by svavaroe »

Thanks.
But I actually have no idea how to tweak my graph with rrdtool in cacti.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please see man rrdgraph, --y-grid parameter. Cacti as of 087 supports this.
R.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests