diff --git a/net-mgmt/telegraf/Makefile b/net-mgmt/telegraf/Makefile
index 06a8f497b..dda18ec0e 100644
--- a/net-mgmt/telegraf/Makefile
+++ b/net-mgmt/telegraf/Makefile
@@ -1,5 +1,5 @@
PLUGIN_NAME= telegraf
-PLUGIN_VERSION= 1.5.1
+PLUGIN_VERSION= 1.7.0
PLUGIN_COMMENT= Agent for collecting metrics and data
PLUGIN_DEPENDS= telegraf
PLUGIN_MAINTAINER= m.muenz@gmail.com
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/Api/KeyController.php b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/Api/KeyController.php
new file mode 100644
index 000000000..a60c33101
--- /dev/null
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/Api/KeyController.php
@@ -0,0 +1,64 @@
+
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+namespace OPNsense\Telegraf\Api;
+
+use \OPNsense\Base\ApiMutableModelControllerBase;
+
+class KeyController extends ApiMutableModelControllerBase
+{
+ static protected $internalModelName = 'key';
+ static protected $internalModelClass = '\OPNsense\Telegraf\Key';
+
+ public function searchKeyAction()
+ {
+ return $this->searchBase('keys.key', array("enabled", "name", "value"));
+ }
+ public function getKeyAction($uuid = null)
+ {
+ $this->sessionClose();
+ return $this->getBase('key', 'keys.key', $uuid);
+ }
+ public function addKeyAction()
+ {
+ return $this->addBase('key', 'keys.key');
+ }
+ public function delKeyAction($uuid)
+ {
+ return $this->delBase('keys.key', $uuid);
+ }
+ public function setKeyAction($uuid)
+ {
+ return $this->setBase('key', 'keys.key', $uuid);
+ }
+ public function toggleKeyAction($uuid)
+ {
+ return $this->toggleBase('keys.key', $uuid);
+ }
+}
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/GeneralController.php b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/GeneralController.php
index 8e4ae931d..b77ff77ce 100644
--- a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/GeneralController.php
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/GeneralController.php
@@ -33,6 +33,7 @@ class GeneralController extends \OPNsense\Base\IndexController
public function indexAction()
{
$this->view->generalForm = $this->getForm("general");
+ $this->view->formDialogEditTelegrafKey = $this->getForm("dialogEditTelegrafKey");
$this->view->pick('OPNsense/Telegraf/general');
}
}
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/dialogEditTelegrafKey.xml b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/dialogEditTelegrafKey.xml
new file mode 100644
index 000000000..ce7b19d0e
--- /dev/null
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/dialogEditTelegrafKey.xml
@@ -0,0 +1,20 @@
+
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/input.xml b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/input.xml
index a9d55c3fc..5c80739a0 100644
--- a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/input.xml
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/input.xml
@@ -79,6 +79,12 @@
checkboxRead network interface metrics.
+
+ input.pf
+
+ checkbox
+ Read PF values via pfctl.
+ input.ping
@@ -93,4 +99,10 @@
trueSet the Hosts to ping in a CSV list.
+
+ input.haproxy
+
+ checkbox
+ Enable the collection of HAProxy statistics.
+
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/output.xml b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/output.xml
index 120056dfb..6da1ce813 100644
--- a/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/output.xml
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/output.xml
@@ -101,4 +101,28 @@
textSet the index name.
+
+ output.prometheus_enable
+
+ checkbox
+ This will enable Prometheus as output.
+
+
+ output.prometheus_listen
+
+ text
+ Port to listen on.
+
+
+ output.prometheus_exclude
+
+ text
+ Collectors to enable, valid entries are "gocollector" and "process". If unset, both are enabled.
+
+
+ output.prometheus_stringaslabel
+
+ checkbox
+ Send string metrics as Prometheus labels.
+
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Input.xml b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Input.xml
index dfb2e2465..04956316d 100644
--- a/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Input.xml
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Input.xml
@@ -1,7 +1,7 @@
//OPNsense/telegraf/inputTelegraf inputs configuration
- 1.0.0
+ 1.0.11
@@ -55,6 +55,10 @@
0N
+
+ 0
+ N
+ 0N
@@ -62,5 +66,9 @@
N
+
+ 0
+ N
+
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Key.php b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Key.php
new file mode 100644
index 000000000..9eee9e90d
--- /dev/null
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Key.php
@@ -0,0 +1,31 @@
+
+ All rights reserved.
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ POSSIBILITY OF SUCH DAMAGE.
+*/
+
+namespace OPNsense\Telegraf;
+
+use OPNsense\Base\BaseModel;
+
+class Key extends BaseModel
+{
+}
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Key.xml b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Key.xml
new file mode 100644
index 000000000..f1ed05a5d
--- /dev/null
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Key.xml
@@ -0,0 +1,25 @@
+
+ //OPNsense/telegraf/key
+ Telegraf key configuration
+ 1.0.0
+
+
+
+
+ 1
+ Y
+
+
+
+ N
+ /^([0-9a-zA-Z._\-]){1,128}$/u
+
+
+
+ N
+ /^([0-9a-zA-Z._\-]){1,128}$/u
+
+
+
+
+
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Output.xml b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Output.xml
index 53f0a26fd..a188c8d32 100644
--- a/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Output.xml
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Output.xml
@@ -66,5 +66,20 @@
telegraf-%Y.%m.%dN
+
+ 0
+ N
+
+
+ 9273
+ N
+
+
+ N
+
+
+ 1
+ N
+
diff --git a/net-mgmt/telegraf/src/opnsense/mvc/app/views/OPNsense/Telegraf/general.volt b/net-mgmt/telegraf/src/opnsense/mvc/app/views/OPNsense/Telegraf/general.volt
index eb7b2c0fe..91a096f6b 100644
--- a/net-mgmt/telegraf/src/opnsense/mvc/app/views/OPNsense/Telegraf/general.volt
+++ b/net-mgmt/telegraf/src/opnsense/mvc/app/views/OPNsense/Telegraf/general.volt
@@ -29,6 +29,7 @@ POSSIBILITY OF SUCH DAMAGE.