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
My snmpd.conf is configured as :
Code: Select all
extend .1.3.6.1.3.19811018.30 conntrack_count /etc/snmp/ip_conntrack.sh
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"
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