net-mgmt/telegraf: add ZFS input (#946)

(cherry picked from commit dc57f4e71f)
This commit is contained in:
Michael 2018-10-31 10:54:27 +01:00 committed by Franco Fichtner
parent 70a37ccdad
commit bdb0676a98
4 changed files with 17 additions and 2 deletions

View file

@ -1,5 +1,5 @@
PLUGIN_NAME= telegraf
PLUGIN_VERSION= 1.7.0
PLUGIN_VERSION= 1.7.1
PLUGIN_COMMENT= Agent for collecting metrics and data
PLUGIN_DEPENDS= telegraf
PLUGIN_MAINTAINER= m.muenz@gmail.com

View file

@ -105,4 +105,10 @@
<type>checkbox</type>
<help>Enable the collection of HAProxy statistics.</help>
</field>
<field>
<id>input.zfs</id>
<label>ZFS</label>
<type>checkbox</type>
<help>Enable the collection of ZFS statistics.</help>
</field>
</form>

View file

@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/telegraf/input</mount>
<description>Telegraf inputs configuration</description>
<version>1.0.1</version>
<version>1.0.2</version>
<items>
<cpu type="BooleanField">
<default>1</default>
@ -70,5 +70,9 @@
<default>0</default>
<Required>N</Required>
</haproxy>
<zfs type="BooleanField">
<default>0</default>
<Required>N</Required>
</zfs>
</items>
</model>

View file

@ -187,4 +187,9 @@
servers = ["socket:/var/run/haproxy.socket"]
{% endif %}
{% if helpers.exists('OPNsense.telegraf.input.zfs') and OPNsense.telegraf.input.zfs == '1' %}
[[inputs.zfs]]
poolMetrics = true
{% endif %}
{% endif %}