diff --git a/net-mgmt/collectd/Makefile b/net-mgmt/collectd/Makefile
index 4f70be1e8..c4f0001d3 100644
--- a/net-mgmt/collectd/Makefile
+++ b/net-mgmt/collectd/Makefile
@@ -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
diff --git a/net-mgmt/collectd/src/opnsense/mvc/app/controllers/OPNsense/Collectd/forms/general.xml b/net-mgmt/collectd/src/opnsense/mvc/app/controllers/OPNsense/Collectd/forms/general.xml
index 4c4c8b5d1..3e588da00 100644
--- a/net-mgmt/collectd/src/opnsense/mvc/app/controllers/OPNsense/Collectd/forms/general.xml
+++ b/net-mgmt/collectd/src/opnsense/mvc/app/controllers/OPNsense/Collectd/forms/general.xml
@@ -83,6 +83,18 @@
text
Set the port of the graphite collector, Graphite is using 2003 per default.
+
+ general.p_graphite_prefix
+
+ text
+ Prefix to set before the hostname. If it ends with a dot it creates an own directory.
+
+
+ general.p_graphite_postfix
+
+ text
+ String to set after the hostname. For compatibility reason default is collectd, but you can also simply remove it.
+
general.p_contextswitch_enable
diff --git a/net-mgmt/collectd/src/opnsense/mvc/app/models/OPNsense/Collectd/General.xml b/net-mgmt/collectd/src/opnsense/mvc/app/models/OPNsense/Collectd/General.xml
index fae36b520..c7dc384c1 100644
--- a/net-mgmt/collectd/src/opnsense/mvc/app/models/OPNsense/Collectd/General.xml
+++ b/net-mgmt/collectd/src/opnsense/mvc/app/models/OPNsense/Collectd/General.xml
@@ -1,6 +1,7 @@
//OPNsense/collectd/general
Collectd configuration
+ 1.0.0
0
@@ -68,6 +69,14 @@
1
65535
+
+ collectd
+ N
+
+
+ collectd
+ N
+
1
N
diff --git a/net-mgmt/collectd/src/opnsense/service/templates/OPNsense/Collectd/collectd.conf b/net-mgmt/collectd/src/opnsense/service/templates/OPNsense/Collectd/collectd.conf
index 4e578e019..81e978114 100644
--- a/net-mgmt/collectd/src/opnsense/service/templates/OPNsense/Collectd/collectd.conf
+++ b/net-mgmt/collectd/src/opnsense/service/templates/OPNsense/Collectd/collectd.conf
@@ -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 "_"