mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net-mgmt/telegraf: add ping input (#522)
This commit is contained in:
parent
8ab663eb40
commit
e56015403c
4 changed files with 30 additions and 2 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= telegraf
|
||||
PLUGIN_VERSION= 1.2
|
||||
PLUGIN_VERSION= 1.3
|
||||
PLUGIN_COMMENT= Agent for collecting metrics and data
|
||||
PLUGIN_DEPENDS= telegraf
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
|
|
|||
|
|
@ -77,4 +77,18 @@
|
|||
<type>checkbox</type>
|
||||
<help>Read network interface metrics.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>input.ping</id>
|
||||
<label>Ping</label>
|
||||
<type>checkbox</type>
|
||||
<help>Ping Hosts and measure the metrics.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>input.ping_hosts</id>
|
||||
<label>Ping Hosts</label>
|
||||
<type>select_multiple</type>
|
||||
<style>tokenize</style>
|
||||
<allownew>true</allownew>
|
||||
<help>Set the Hosts to ping in a CSV list.</help>
|
||||
</field>
|
||||
</form>
|
||||
|
|
|
|||
|
|
@ -55,5 +55,12 @@
|
|||
<default>0</default>
|
||||
<Required>N</Required>
|
||||
</network>
|
||||
</items>
|
||||
<ping type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>N</Required>
|
||||
</ping>
|
||||
<ping_hosts type="CSVListField">
|
||||
<Required>N</Required>
|
||||
</ping_hosts>
|
||||
</items>
|
||||
</model>
|
||||
|
|
|
|||
|
|
@ -132,4 +132,11 @@
|
|||
[[inputs.net]]
|
||||
{% endif %}
|
||||
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping') and OPNsense.telegraf.input.ping == '1' %}
|
||||
[[inputs.ping]]
|
||||
{% if helpers.exists('OPNsense.telegraf.input.ping_hosts') and OPNsense.telegraf.input.ping_hosts != '' %}
|
||||
urls = [{{ "'" + ("','".join(OPNsense.telegraf.input.ping_hosts.split(','))) + "'" }}]
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue