net-mgmt/telegraf: Add ntpq input (#1965)

This commit is contained in:
nan0
2020-08-28 10:02:05 +02:00
committed by GitHub
parent 3ee618ecdf
commit 7ead9914da
5 changed files with 35 additions and 2 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
PLUGIN_NAME= telegraf
PLUGIN_VERSION= 1.8.1
PLUGIN_VERSION= 1.8.2
PLUGIN_COMMENT= Agent for collecting metrics and data
PLUGIN_DEPENDS= telegraf
PLUGIN_MAINTAINER= m.muenz@gmail.com
+4
View File
@@ -11,6 +11,10 @@ Kafka, MQTT, NSQ, and many others.
Plugin Changelog
================
1.8.2
* Add 'ntpq' input
1.8.1
* Fix 'flush interval' templating by @Jontron123
@@ -111,4 +111,16 @@
<type>checkbox</type>
<help>Enable the collection of ZFS statistics.</help>
</field>
<field>
<id>input.ntpq</id>
<label>NTPQ</label>
<type>checkbox</type>
<help>Enable the collection of NTP query metrics.</help>
</field>
<field>
<id>input.ntpq_dns_lookup</id>
<label>NTPQ DNS Lookup</label>
<type>checkbox</type>
<help>Can increase metric gather times.</help>
</field>
</form>
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/telegraf/input</mount>
<description>Telegraf inputs configuration</description>
<version>1.0.2</version>
<version>1.0.3</version>
<items>
<cpu type="BooleanField">
<default>1</default>
@@ -74,5 +74,13 @@
<default>0</default>
<Required>N</Required>
</zfs>
<ntpq type="BooleanField">
<default>0</default>
<Required>N</Required>
</ntpq>
<ntpq_dns_lookup type="BooleanField">
<default>0</default>
<Required>N</Required>
</ntpq_dns_lookup>
</items>
</model>
@@ -224,4 +224,13 @@
poolMetrics = true
{% endif %}
{% if helpers.exists('OPNsense.telegraf.input.ntpq') and OPNsense.telegraf.input.ntpq == '1' %}
[[inputs.ntpq]]
{% if helpers.exists('OPNsense.telegraf.input.ntpq_dns_lookup') and OPNsense.telegraf.input.ntpq_dns_lookup == '1' %}
dns_lookup = true
{% else %}
dns_lookup = false
{% endif %}
{% endif %}
{% endif %}