mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
net-mgmt/collectd: add prefix and postfix input fields (#298)
* bump version * add pre and postfix * add pre and postfix * add pre and postfix to template * set version 1.1.0 * set version to 1.0.0
This commit is contained in:
parent
c481894389
commit
3e203bd5c2
4 changed files with 28 additions and 3 deletions
|
|
@ -1,5 +1,5 @@
|
|||
PLUGIN_NAME= collectd
|
||||
PLUGIN_VERSION= 1.0
|
||||
PLUGIN_VERSION= 1.1
|
||||
PLUGIN_COMMENT= Collect system and application performance metrics periodically
|
||||
PLUGIN_DEPENDS= collectd5
|
||||
PLUGIN_MAINTAINER= m.muenz@gmail.com
|
||||
|
|
|
|||
|
|
@ -83,6 +83,18 @@
|
|||
<type>text</type>
|
||||
<help>Set the port of the graphite collector, Graphite is using 2003 per default.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.p_graphite_prefix</id>
|
||||
<label>Graphite Prefix</label>
|
||||
<type>text</type>
|
||||
<help>Prefix to set before the hostname. If it ends with a dot it creates an own directory.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.p_graphite_postfix</id>
|
||||
<label>Graphite Postfix</label>
|
||||
<type>text</type>
|
||||
<help>String to set after the hostname. For compatibility reason default is collectd, but you can also simply remove it.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>general.p_contextswitch_enable</id>
|
||||
<label>Enable contextswitch plugin</label>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<model>
|
||||
<mount>//OPNsense/collectd/general</mount>
|
||||
<description>Collectd configuration</description>
|
||||
<version>1.0.0</version>
|
||||
<items>
|
||||
<enabled type="BooleanField">
|
||||
<default>0</default>
|
||||
|
|
@ -68,6 +69,14 @@
|
|||
<MinimumValue>1</MinimumValue>
|
||||
<MaximumValue>65535</MaximumValue>
|
||||
</p_graphite_port>
|
||||
<p_graphite_prefix type="TextField">
|
||||
<default>collectd</default>
|
||||
<Required>N</Required>
|
||||
</p_graphite_prefix>
|
||||
<p_graphite_postfix type="TextField">
|
||||
<default>collectd</default>
|
||||
<Required>N</Required>
|
||||
</p_graphite_postfix>
|
||||
<p_contextswitch_enable type="BooleanField">
|
||||
<default>1</default>
|
||||
<Required>N</Required>
|
||||
|
|
|
|||
|
|
@ -94,8 +94,12 @@ LoadPlugin write_graphite
|
|||
Protocol "tcp"
|
||||
ReconnectInterval 0
|
||||
LogSendErrors true
|
||||
Prefix "collectd"
|
||||
Postfix "collectd"
|
||||
{% if helpers.exists('OPNsense.collectd.general.p_graphite_prefix') and OPNsense.collectd.general.p_graphite_prefix != '' %}
|
||||
Prefix "{{ OPNsense.collectd.general.p_graphite_prefix }}"
|
||||
{% endif %}
|
||||
{% if helpers.exists('OPNsense.collectd.general.p_graphite_postfix') and OPNsense.collectd.general.p_graphite_postfix != '' %}
|
||||
Postfix "{{ OPNsense.collectd.general.p_graphite_postfix }}"
|
||||
{% endif %}
|
||||
StoreRates true
|
||||
AlwaysAppendDS false
|
||||
EscapeCharacter "_"
|
||||
|
|
|
|||
Loading…
Reference in a new issue