net-mgmt/telegraf: Add apcupsd input (#3177)

This commit is contained in:
nan0 2022-10-27 15:05:45 +02:00 committed by GitHub
parent efade39416
commit fe0392a9f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 1 deletions

View file

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

View file

@ -12,6 +12,10 @@ WWW: https://www.influxdata.com/time-series-platform/telegraf/
Plugin Changelog
================
1.12.6
* Add apcupsd input
1.12.5
* Add support for basic HTTP Authentication agains Elasticsearch (contributed by psychogun)

View file

@ -179,4 +179,16 @@
<type>checkbox</type>
<help>Enable the collection of Unbound metrics.</help>
</field>
<field>
<id>input.apcupsd</id>
<label>Apcupsd</label>
<type>checkbox</type>
<help>Enable the collection of apcupsd metrics.</help>
</field>
<field>
<id>input.apcupsd_server</id>
<label>Apcupsd Netserver IP Address</label>
<type>text</type>
<help>IP address or hostname of the apcupsd net information server. Default address is 127.0.0.1</help>
</field>
</form>

View file

@ -114,5 +114,11 @@
<unbound type="BooleanField">
<Required>N</Required>
</unbound>
<apcupsd type="BooleanField">
<Required>N</Required>
</apcupsd>
<apcupsd_server type="TextField">
<Required>N</Required>
</apcupsd_server>
</items>
</model>

View file

@ -303,4 +303,10 @@
timeout = "5s"
{% endif %}
{% if helpers.exists('OPNsense.telegraf.input.apcupsd') and OPNsense.telegraf.input.apcupsd == '1' %}
[[inputs.apcupsd]]
servers = ["tcp://{{ OPNsense.telegraf.input.apcupsd_server|default('127.0.0.1') }}:3551"]
timeout = "5s"
{% endif %}
{% endif %}