aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2020-10-01 14:50:23 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2020-10-01 14:50:23 +0200
commit5838f6791c7a7bae297f67c18b240716e608c761 (patch)
tree5716d4d818618a7c8399a0131fe407ffa8e8b346 /ansible
parent62db38129f064dc88b028cd2058c67ce577fbe2a (diff)
downloadinfra-5838f6791c7a7bae297f67c18b240716e608c761.tar.gz
infra-5838f6791c7a7bae297f67c18b240716e608c761.tar.bz2
infra-5838f6791c7a7bae297f67c18b240716e608c761.tar.xz
infra-5838f6791c7a7bae297f67c18b240716e608c761.zip
unifi: More SNMP.
Diffstat (limited to 'ansible')
-rw-r--r--ansible/plays/templates/ops-server/telegraf.conf579
-rw-r--r--ansible/plays/templates/ops-server/telegraf.conf.j269
2 files changed, 322 insertions, 326 deletions
diff --git a/ansible/plays/templates/ops-server/telegraf.conf b/ansible/plays/templates/ops-server/telegraf.conf
index 7b36879..307da93 100644
--- a/ansible/plays/templates/ops-server/telegraf.conf
+++ b/ansible/plays/templates/ops-server/telegraf.conf
@@ -10,6 +10,7 @@
agents = [ "192.168.10.10" ]
version = 2
community = "public"
+ name = "snmp_mem"
[[inputs.snmp.field]]
oid = "RFC1213-MIB::sysName.0"
@@ -26,11 +27,45 @@
name = "snmp_if_iftable"
inherit_tags = ["name", "location"]
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifName"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifLinkUpDownTrapEnable"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifHighSpeed"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifPromiscuousMode"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifConnectorPresent"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifAlias"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifCounterDiscontinuityTime"
+ is_tag = true
+
+#
+# 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"
@@ -56,65 +91,6 @@
name = "memCached"
oid = "UCD-SNMP-MIB::memCached.0"
-#
-# SNMP Fields that should be tags
-#
-
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifLinkUpDownTrapEnable"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifHighSpeed"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifPromiscuousMode"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifConnectorPresent"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifAlias"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifCounterDiscontinuityTime"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UCD-SNMP-MIB::laNames"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiRadioName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiRadioRadio"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapBssId"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapCcq"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapEssId"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapRadio"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapUp"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapUsage"
- is_tag = true
-
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiIfName"
is_tag = true
@@ -125,6 +101,7 @@
agents = [ "192.168.10.11" ]
version = 2
community = "public"
+ name = "snmp_mem"
[[inputs.snmp.field]]
oid = "RFC1213-MIB::sysName.0"
@@ -141,11 +118,45 @@
name = "snmp_if_iftable"
inherit_tags = ["name", "location"]
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifName"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifLinkUpDownTrapEnable"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifHighSpeed"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifPromiscuousMode"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifConnectorPresent"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifAlias"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifCounterDiscontinuityTime"
+ is_tag = true
+
+#
+# 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"
@@ -171,65 +182,6 @@
name = "memCached"
oid = "UCD-SNMP-MIB::memCached.0"
-#
-# SNMP Fields that should be tags
-#
-
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifLinkUpDownTrapEnable"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifHighSpeed"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifPromiscuousMode"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifConnectorPresent"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifAlias"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifCounterDiscontinuityTime"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UCD-SNMP-MIB::laNames"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiRadioName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiRadioRadio"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapBssId"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapCcq"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapEssId"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapRadio"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapUp"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapUsage"
- is_tag = true
-
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiIfName"
is_tag = true
@@ -240,6 +192,7 @@
agents = [ "192.168.10.12" ]
version = 2
community = "public"
+ name = "snmp_mem"
[[inputs.snmp.field]]
oid = "RFC1213-MIB::sysName.0"
@@ -256,11 +209,45 @@
name = "snmp_if_iftable"
inherit_tags = ["name", "location"]
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifName"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifLinkUpDownTrapEnable"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifHighSpeed"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifPromiscuousMode"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifConnectorPresent"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifAlias"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifCounterDiscontinuityTime"
+ is_tag = true
+
+#
+# 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"
@@ -286,65 +273,6 @@
name = "memCached"
oid = "UCD-SNMP-MIB::memCached.0"
-#
-# SNMP Fields that should be tags
-#
-
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifLinkUpDownTrapEnable"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifHighSpeed"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifPromiscuousMode"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifConnectorPresent"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifAlias"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifCounterDiscontinuityTime"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UCD-SNMP-MIB::laNames"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiRadioName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiRadioRadio"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapBssId"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapCcq"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapEssId"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapRadio"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapUp"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "UBNT-UniFi-MIB::unifiVapUsage"
- is_tag = true
-
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiIfName"
is_tag = true
@@ -355,6 +283,7 @@
agents = [ "192.168.10.20" ]
version = 2
community = "public"
+ name = "snmp_mem"
[[inputs.snmp.field]]
oid = "RFC1213-MIB::sysName.0"
@@ -371,11 +300,45 @@
name = "snmp_if_iftable"
inherit_tags = ["name", "location"]
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifName"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifLinkUpDownTrapEnable"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifHighSpeed"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifPromiscuousMode"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifConnectorPresent"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifAlias"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifCounterDiscontinuityTime"
+ is_tag = true
+
+#
+# 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"
@@ -401,53 +364,16 @@
name = "memCached"
oid = "UCD-SNMP-MIB::memCached.0"
+#
+# unifi_radio
+#
+
[[inputs.snmp.table]]
oid = "UBNT-UniFi-MIB::unifiRadioTable"
name = "unifi_radio"
index_as_tag = true
inherit_tags = ["name", "location"]
-[[inputs.snmp.table]]
- oid = "UBNT-UniFi-MIB::unifiVapTable"
- name = "unifi_vap"
- index_as_tag = true
- inherit_tags = ["name", "location"]
-
-[[inputs.snmp.table]]
- oid = "UBNT-UniFi-MIB::unifiIfTable"
- name = "unifi_if_table"
- inherit_tags = ["name", "location"]
-
-#
-# SNMP Fields that should be tags
-#
-
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifLinkUpDownTrapEnable"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifHighSpeed"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifPromiscuousMode"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifConnectorPresent"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifAlias"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifCounterDiscontinuityTime"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UCD-SNMP-MIB::laNames"
- is_tag = true
-
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiRadioName"
is_tag = true
@@ -455,6 +381,16 @@
oid = "UBNT-UniFi-MIB::unifiRadioRadio"
is_tag = true
+#
+# unifi_vap
+#
+
+[[inputs.snmp.table]]
+ oid = "UBNT-UniFi-MIB::unifiVapTable"
+ name = "unifi_vap"
+ index_as_tag = true
+ inherit_tags = ["name", "location"]
+
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiVapBssId"
is_tag = true
@@ -477,6 +413,15 @@
oid = "UBNT-UniFi-MIB::unifiVapUsage"
is_tag = true
+#
+# unifi_if_table
+#
+
+[[inputs.snmp.table]]
+ oid = "UBNT-UniFi-MIB::unifiIfTable"
+ name = "unifi_if_table"
+ inherit_tags = ["name", "location"]
+
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiIfName"
is_tag = true
@@ -487,6 +432,7 @@
agents = [ "192.168.10.21" ]
version = 2
community = "public"
+ name = "snmp_mem"
[[inputs.snmp.field]]
oid = "RFC1213-MIB::sysName.0"
@@ -503,11 +449,45 @@
name = "snmp_if_iftable"
inherit_tags = ["name", "location"]
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifName"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifLinkUpDownTrapEnable"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifHighSpeed"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifPromiscuousMode"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifConnectorPresent"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifAlias"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifCounterDiscontinuityTime"
+ is_tag = true
+
+#
+# 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"
@@ -533,53 +513,16 @@
name = "memCached"
oid = "UCD-SNMP-MIB::memCached.0"
+#
+# unifi_radio
+#
+
[[inputs.snmp.table]]
oid = "UBNT-UniFi-MIB::unifiRadioTable"
name = "unifi_radio"
index_as_tag = true
inherit_tags = ["name", "location"]
-[[inputs.snmp.table]]
- oid = "UBNT-UniFi-MIB::unifiVapTable"
- name = "unifi_vap"
- index_as_tag = true
- inherit_tags = ["name", "location"]
-
-[[inputs.snmp.table]]
- oid = "UBNT-UniFi-MIB::unifiIfTable"
- name = "unifi_if_table"
- inherit_tags = ["name", "location"]
-
-#
-# SNMP Fields that should be tags
-#
-
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifLinkUpDownTrapEnable"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifHighSpeed"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifPromiscuousMode"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifConnectorPresent"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifAlias"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifCounterDiscontinuityTime"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UCD-SNMP-MIB::laNames"
- is_tag = true
-
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiRadioName"
is_tag = true
@@ -587,6 +530,16 @@
oid = "UBNT-UniFi-MIB::unifiRadioRadio"
is_tag = true
+#
+# unifi_vap
+#
+
+[[inputs.snmp.table]]
+ oid = "UBNT-UniFi-MIB::unifiVapTable"
+ name = "unifi_vap"
+ index_as_tag = true
+ inherit_tags = ["name", "location"]
+
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiVapBssId"
is_tag = true
@@ -609,6 +562,15 @@
oid = "UBNT-UniFi-MIB::unifiVapUsage"
is_tag = true
+#
+# unifi_if_table
+#
+
+[[inputs.snmp.table]]
+ oid = "UBNT-UniFi-MIB::unifiIfTable"
+ name = "unifi_if_table"
+ inherit_tags = ["name", "location"]
+
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiIfName"
is_tag = true
@@ -619,6 +581,7 @@
agents = [ "192.168.10.22" ]
version = 2
community = "public"
+ name = "snmp_mem"
[[inputs.snmp.field]]
oid = "RFC1213-MIB::sysName.0"
@@ -635,11 +598,45 @@
name = "snmp_if_iftable"
inherit_tags = ["name", "location"]
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifName"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifLinkUpDownTrapEnable"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifHighSpeed"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifPromiscuousMode"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifConnectorPresent"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifAlias"
+ is_tag = true
+[[inputs.snmp.table.field]]
+ oid = "IF-MIB::ifCounterDiscontinuityTime"
+ is_tag = true
+
+#
+# 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"
@@ -665,53 +662,16 @@
name = "memCached"
oid = "UCD-SNMP-MIB::memCached.0"
+#
+# unifi_radio
+#
+
[[inputs.snmp.table]]
oid = "UBNT-UniFi-MIB::unifiRadioTable"
name = "unifi_radio"
index_as_tag = true
inherit_tags = ["name", "location"]
-[[inputs.snmp.table]]
- oid = "UBNT-UniFi-MIB::unifiVapTable"
- name = "unifi_vap"
- index_as_tag = true
- inherit_tags = ["name", "location"]
-
-[[inputs.snmp.table]]
- oid = "UBNT-UniFi-MIB::unifiIfTable"
- name = "unifi_if_table"
- inherit_tags = ["name", "location"]
-
-#
-# SNMP Fields that should be tags
-#
-
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifName"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifLinkUpDownTrapEnable"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifHighSpeed"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifPromiscuousMode"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifConnectorPresent"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifAlias"
- is_tag = true
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::ifCounterDiscontinuityTime"
- is_tag = true
-
-[[inputs.snmp.table.field]]
- oid = "UCD-SNMP-MIB::laNames"
- is_tag = true
-
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiRadioName"
is_tag = true
@@ -719,6 +679,16 @@
oid = "UBNT-UniFi-MIB::unifiRadioRadio"
is_tag = true
+#
+# unifi_vap
+#
+
+[[inputs.snmp.table]]
+ oid = "UBNT-UniFi-MIB::unifiVapTable"
+ name = "unifi_vap"
+ index_as_tag = true
+ inherit_tags = ["name", "location"]
+
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiVapBssId"
is_tag = true
@@ -741,6 +711,15 @@
oid = "UBNT-UniFi-MIB::unifiVapUsage"
is_tag = true
+#
+# unifi_if_table
+#
+
+[[inputs.snmp.table]]
+ oid = "UBNT-UniFi-MIB::unifiIfTable"
+ name = "unifi_if_table"
+ inherit_tags = ["name", "location"]
+
[[inputs.snmp.table.field]]
oid = "UBNT-UniFi-MIB::unifiIfName"
is_tag = true
diff --git a/ansible/plays/templates/ops-server/telegraf.conf.j2 b/ansible/plays/templates/ops-server/telegraf.conf.j2
index f6a1c87..15523c0 100644
--- a/ansible/plays/templates/ops-server/telegraf.conf.j2
+++ b/ansible/plays/templates/ops-server/telegraf.conf.j2
@@ -24,6 +24,7 @@
interval = "60s"
timeout = "30s"
{% endif %}
+ name = "snmp_mem"
[[inputs.snmp.field]]
oid = "RFC1213-MIB::sysName.0"
@@ -40,11 +41,29 @@
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"
@@ -71,50 +90,48 @@
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"]
-[[inputs.snmp.table]]
- oid = "UBNT-UniFi-MIB::unifiVapTable"
- name = "unifi_vap"
- index_as_tag = true
- inherit_tags = ["name", "location"]
-
-[[inputs.snmp.table]]
- oid = "UBNT-UniFi-MIB::unifiIfTable"
- name = "unifi_if_table"
- inherit_tags = ["name", "location"]
-{% endif %}
-
-#
-# SNMP Fields that should be tags
-#
-
-{% for f in [ "ifName", "ifLinkUpDownTrapEnable", "ifHighSpeed", "ifPromiscuousMode", "ifConnectorPresent", "ifAlias", "ifCounterDiscontinuityTime" ] %}
-[[inputs.snmp.table.field]]
- oid = "IF-MIB::{{ f }}"
- is_tag = true
-{% endfor %}
-
-[[inputs.snmp.table.field]]
- oid = "UCD-SNMP-MIB::laNames"
- is_tag = true
-
{% 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