summaryrefslogtreecommitdiff
path: root/ansible/plays/templates/ops-server/telegraf.conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/plays/templates/ops-server/telegraf.conf.j2')
-rw-r--r--ansible/plays/templates/ops-server/telegraf.conf.j269
1 files changed, 43 insertions, 26 deletions
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