Telegraf Cisco Switch
So I’m not able to get any SNMP data via telegraf today Kindly assist
-
Telegraf and InluxDB running on Ubuntu
-
SNMP and SNMPD updates done
-
Community string added, snmpd service restarted
-
snmpwalk command works fine for the Cisco switch
snmpwalk -v 2c -c test 1.1.1.1 | more
Throws some stats fine
SNMPv2-MIB::sysDescr.0 = STRING: Cisco IOS Software, IOS-XE Software, Catalyst 4500 L3 Switch Software (cat4500e-UNIVERSALK9-M), Version 03.09.01.E RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2016 by Cisco Systems, Inc.
Compiled Tue 2
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises.9.1.1732
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1683825735) 194 days, 21:17:37.35
SNMPv2-MIB::sysContact.0 = STRING:
SNMPv2-MIB::sysName.0 = STRING: core-cn2a.dcn.ipc.telstra.net
SNMPv2-MIB::sysLocation.0 = STRING:
SNMPv2-MIB::sysServices.0 = INTEGER: 6
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-SMI::enterprises.9.7.129
SNMPv2-MIB::sysORID.2 = OID: SNMPv2-SMI::enterprises.9.7.115
SNMPv2-MIB::sysORID.3 = OID: SNMPv2-SMI::enterprises.9.7.265
Telegraf does not collect data into influxDB
telegraf snmp config is below:
[[inputs.snmp]]
agents = [ “1.1.1.1:161” ] # this is an example for a single snmp get
version = 2
community = “test” # The community to be used
[[inputs.snmp.field]] # Try to allways keep this block in order to include hostanme info in all your records inserted on the database
name = “hostname”
oid = “.1.3.6.1.2.1.1.5.0”
is_tag = true
[[inputs.snmp.table]] # this is an example for a snmp walk
name = “interface_statistics”
inherit_tags = [ “hostname” ] # See note below.
[inputs.snmp.tagpass]
ifName = [“[g|x]e-”,“ae”] # This is relevant for filtering unwanted records
[[inputs.snmp.table.field]] # This is the ‘key’ of the table, the element that helps to differentiate each record on the table.
name = “ifName”
oid = “.1.3.6.1.2.1.31.1.1.1.1”
is_tag = true
[[inputs.snmp.table.field]] # Get a element of the table
name = “ifHCInOctets”
oid = “.1.3.6.1.2.1.31.1.1.1.6”
telegraf --test does not show any measurement/ table created. Default system stats work fine!
Thanks