I'm trying to find the best way to get a status for when a Cisco switch is offline from the network. I'm trying to use the field of ifOperStatus so when the interface is offline it goes red, green for when its online.
I'm using Grafana/InfluxDB/Telegraf for my stack. Anyone else doing this and can share how to get it working? below is my conf file in the telegraf.d folder.
[[inputs.snmp]] agents = [ "10.10.10.10" ] version = 2 community = "SNMP-READ" interval = "60s" timeout = "10s" retries = 3
[[inputs.snmp.field]] name = "hostname" oid = "RFC1213-MIB::sysName.0" is_tag = true
[[inputs.snmp.field]] name = "uptime" oid = "DISMAN-EXPRESSION-MIB::sysUpTimeInstance"
IF-MIB::ifTable contains counters on input and output traffic as well as errors and discards. [[inputs.snmp.table]] name = "interface" inherit_tags = [ "hostname" ] oid = "IF-MIB::ifTable"
Interface tag - used to identify interface in metrics database
[[inputs.snmp.table.field]] name = "ifDescr" oid = "IF-MIB::ifDescr" is_tag = true
IF-MIB::ifXTable contains newer High Capacity (HC) counters that do not overflow as fast for a few of the ifTable counters [[inputs.snmp.table]] name = "interface" inherit_tags = [ "hostname" ] oid = "IF-MIB::ifXTable"
Interface tag - used to identify interface in metrics database
[[inputs.snmp.table.field]] name = "ifDescr" oid = "IF-MIB::ifDescr" is_tag = true
EtherLike-MIB::dot3StatsTable contains detailed ethernet-level information about what kind of errors have been logged on an interface (such as FCS error, frame too long, etc) [[inputs.snmp.table]] name = "interface" inherit_tags = [ "hostname" ] oid = "EtherLike-MIB::dot3StatsTable"
Interface tag - used to identify interface in metrics database
[[inputs.snmp.table.field]] name = "ifDescr" oid = "IF-MIB::ifDescr" is_tag = true
No comments:
Post a Comment