WaterByWind / grafana-dashboards

Grafana Dashboards
MIT License
292 stars 54 forks source link

Improvement Hint: inherit_tags = ["sysName"] #22

Open zeroflow opened 5 years ago

zeroflow commented 5 years ago

Hi,

I saw your post on the Ubiquiti forums and it helped a lot.

I noticed, that all the SNMP tables did lack the sysName information.

If you add inherit_tags = ["sysName"] to each table, you can get the name of the Device from Unifi into your series to group by device name or so on

   #  Ethernet interfaces
   [[inputs.snmp.table]]
     oid = "UBNT-UniFi-MIB::unifiIfTable"
     inherit_tags = ["sysName"]
     [[inputs.snmp.table.field]]
       is_tag = true
       oid = "UBNT-UniFi-MIB::unifiIfName"
WaterByWind commented 4 years ago

The agent_host tag already exists natively. This is the tag used for the device selector on the dashboard.

Adding 'sysName' as an inherited tag shouldn't affect cardinality so if this is used instead of agent_host it could be added with minimal impact to the indices. It might seem to be redundant but perhaps there is a use case?