From d453d7a1ea94064f5a3f8f4337bd0508c07fe51e Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sun, 12 Jan 2020 12:15:40 +0100 Subject: [PATCH] Also index unifi AP with geolocation --- .../templates/prometheus/snmp.yml.j2 | 79 +++++++++++++------ 1 file changed, 56 insertions(+), 23 deletions(-) diff --git a/roles/prometheus-snmp-exporter/templates/prometheus/snmp.yml.j2 b/roles/prometheus-snmp-exporter/templates/prometheus/snmp.yml.j2 index b721b775..638467d1 100644 --- a/roles/prometheus-snmp-exporter/templates/prometheus/snmp.yml.j2 +++ b/roles/prometheus-snmp-exporter/templates/prometheus/snmp.yml.j2 @@ -125,19 +125,20 @@ ubiquiti_unifi: - 1.3.6.1.2.1.1.5.0 - 1.3.6.1.2.1.1.6.0 metrics: -# Pour faire une WifiMap un jour, on peut entrer la location dans la conf des bornes -# - name: sysLocation -# oid: 1.3.6.1.2.1.1.6 -# type: DisplayString -# help: The physical location of this node (e.g., 'telephone closet, 3rd floor') -# - 1.3.6.1.2.1.1.6 + - name: unifi_sys_location + oid: 1.3.6.1.2.1.1.6 + type: DisplayString + help: The physical location of this node as a geohash + - 1.3.6.1.2.1.1.6 - name: unifi_vap_channel oid: 1.3.6.1.4.1.41112.1.6.1.2.1.4 type: gauge help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.4' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_essid oid: 1.3.6.1.4.1.41112.1.6.1.2.1.6 type: DisplayString @@ -148,112 +149,144 @@ ubiquiti_unifi: help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.8' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_radio oid: 1.3.6.1.4.1.41112.1.6.1.2.1.9 type: DisplayString help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.9' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_rx_bytes oid: 1.3.6.1.4.1.41112.1.6.1.2.1.10 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.10' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_rx_crypts oid: 1.3.6.1.4.1.41112.1.6.1.2.1.11 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.11' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_rx_dropped oid: 1.3.6.1.4.1.41112.1.6.1.2.1.12 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.12' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_rx_errors oid: 1.3.6.1.4.1.41112.1.6.1.2.1.13 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.13' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_rx_frags oid: 1.3.6.1.4.1.41112.1.6.1.2.1.14 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.14' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_rx_packets oid: 1.3.6.1.4.1.41112.1.6.1.2.1.15 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.15' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_tx_bytes oid: 1.3.6.1.4.1.41112.1.6.1.2.1.16 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.16' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_tx_dropped oid: 1.3.6.1.4.1.41112.1.6.1.2.1.17 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.17' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_tx_errors oid: 1.3.6.1.4.1.41112.1.6.1.2.1.18 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.18' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_tx_packets oid: 1.3.6.1.4.1.41112.1.6.1.2.1.19 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.19' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_tx_retries oid: 1.3.6.1.4.1.41112.1.6.1.2.1.20 type: counter help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.20' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_tx_power oid: 1.3.6.1.4.1.41112.1.6.1.2.1.21 type: gauge help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.21' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_up oid: 1.3.6.1.4.1.41112.1.6.1.2.1.22 type: gauge help: ' - 1.3.6.1.4.1.41112.1.6.1.2.1.22' indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_vap_usage oid: 1.3.6.1.4.1.41112.1.6.1.2.1.23 type: DisplayString help: guest or regular user - 1.3.6.1.4.1.41112.1.6.1.2.1.23 indexes: - labelname: unifi_vap_essid - type: gauge + type: DisplayString + - labelname: unifi_sys_location + type: DisplayString - name: unifi_if_index oid: 1.3.6.1.4.1.41112.1.6.2.1.1.1 type: gauge