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 0b1c1a6e4..b627fa1e6 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
@@ -143,6 +143,18 @@
text
Set the URL where metrics shoud be sent to.
+
+ output.elastic_username
+
+ text
+ Optional HTTP basic authentication details for Elasticsearch.
+
+
+ output.elastic_password
+
+ text
+ Optional HTTP basic authentication details for Elasticsearch.
+
output.elastic_timeout
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 7e7bdb805..404bd8ddf 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
@@ -70,6 +70,12 @@
N
+
+ N
+
+
+ N
+
5
N
diff --git a/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf b/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf
index 699fbcc9a..619f0f6d6 100644
--- a/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf
+++ b/net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf
@@ -127,6 +127,12 @@
{% if helpers.exists('OPNsense.telegraf.output.elastic_url') and OPNsense.telegraf.output.elastic_url != '' %}
urls = ["{{ OPNsense.telegraf.output.elastic_url }}"]
{% endif %}
+{% if helpers.exists('OPNsense.telegraf.output.elastic_username') and OPNsense.telegraf.output.elastic_username != '' %}
+{% if helpers.exists('OPNsense.telegraf.output.elastic_password') and OPNsense.telegraf.output.elastic_password != '' %}
+ username = "{{ OPNsense.telegraf.output.elastic_username }}"
+ password = "{{ OPNsense.telegraf.output.elastic_password }}"
+{% endif %}
+{% endif %}
{% if helpers.exists('OPNsense.telegraf.output.elastic_timeout') and OPNsense.telegraf.output.elastic_timeout != '' %}
timeout = "{{ OPNsense.telegraf.output.elastic_timeout }}s"
{% endif %}