[[outputs.influxdb]] urls = ["$INFLUX_URL"] skip_database_creation = false # snmpget -v 3 -u $username -a SHA -A $password -l authPriv -x AES -X $password 192.168.10.21 RFC1213-MIB::sysName.0 {% for device in devices %} # Device: {{ device.name }}, type: {{ device.type }} [[inputs.snmp]] agents = [ "{{ device.ip }}" ] {# Some MIBs are missing over v3 #} {% if true %} version = 2 community = "public" {% else %} version = 3 sec_name = "{{ '{{' }} unifi_snmp_username }}" auth_protocol = "SHA" auth_password = "{{ '{{' }} unifi_snmp_password }}" sec_level = "authPriv" priv_protocol = "AES" priv_password = "{{ '{{' }} unifi_snmp_password }}" interval = "60s" timeout = "30s" {% endif %} name = "snmp_mem" [[inputs.snmp.field]] oid = "RFC1213-MIB::sysName.0" name = "name" is_tag = true [[inputs.snmp.field]] oid = "RFC1213-MIB::sysLocation.0" name = "location" is_tag = true [[inputs.snmp.table]] oid = "IF-MIB::ifXTable" name = "snmp_if_iftable" inherit_tags = ["name", "location"] {% for f in [ "ifName", "ifLinkUpDownTrapEnable", "ifHighSpeed", "ifPromiscuousMode", "ifConnectorPresent", "ifAlias", "ifCounterDiscontinuityTime" ] %} [[inputs.snmp.table.field]] oid = "IF-MIB::{{ f }}" is_tag = true {% endfor %} # # snmp_la_table # [[inputs.snmp.table]] oid = "UCD-SNMP-MIB::laTable" name = "snmp_la_table" inherit_tags = ["name", "location"] [[inputs.snmp.table.field]] oid = "UCD-SNMP-MIB::laNames" is_tag = true # # memory # [[inputs.snmp.field]] name = "memTotalSwap" oid = "UCD-SNMP-MIB::memTotalSwap.0" [[inputs.snmp.field]] name = "memAvailSwap" oid = "UCD-SNMP-MIB::memAvailSwap.0" [[inputs.snmp.field]] name = "memTotalReal" oid = "UCD-SNMP-MIB::memTotalReal.0" [[inputs.snmp.field]] name = "memAvailReal" oid = "UCD-SNMP-MIB::memAvailReal.0" [[inputs.snmp.field]] name = "memTotalFree" oid = "UCD-SNMP-MIB::memTotalFree.0" [[inputs.snmp.field]] name = "memShared" oid = "UCD-SNMP-MIB::memShared.0" [[inputs.snmp.field]] name = "memBuffer" oid = "UCD-SNMP-MIB::memBuffer.0" [[inputs.snmp.field]] name = "memCached" oid = "UCD-SNMP-MIB::memCached.0" {% if device.type == "ap" %} # # unifi_radio # [[inputs.snmp.table]] oid = "UBNT-UniFi-MIB::unifiRadioTable" name = "unifi_radio" index_as_tag = true inherit_tags = ["name", "location"] {% for f in [ "unifiRadioName", "unifiRadioRadio" ] %} [[inputs.snmp.table.field]] oid = "UBNT-UniFi-MIB::{{ f }}" is_tag = true {% endfor %} # # unifi_vap # [[inputs.snmp.table]] oid = "UBNT-UniFi-MIB::unifiVapTable" name = "unifi_vap" index_as_tag = true inherit_tags = ["name", "location"] {% for f in [ "unifiVapBssId", "unifiVapCcq", "unifiVapEssId", "unifiVapName", "unifiVapRadio", "unifiVapUp", "unifiVapUsage" ] %} [[inputs.snmp.table.field]] oid = "UBNT-UniFi-MIB::{{ f }}" is_tag = true {% endfor %} # # unifi_if_table # [[inputs.snmp.table]] oid = "UBNT-UniFi-MIB::unifiIfTable" name = "unifi_if_table" inherit_tags = ["name", "location"] {% endif %} [[inputs.snmp.table.field]] oid = "UBNT-UniFi-MIB::unifiIfName" is_tag = true {% endfor %}