mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
Enables basic HTTP Authentication agains Elasticsearch (#2703)
This commit is contained in:
@@ -143,6 +143,18 @@
|
||||
<type>text</type>
|
||||
<help>Set the URL where metrics shoud be sent to.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>output.elastic_username</id>
|
||||
<label>Elasticsearch Username</label>
|
||||
<type>text</type>
|
||||
<help>Optional HTTP basic authentication details for Elasticsearch.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>output.elastic_password</id>
|
||||
<label>Elasticsearch Password</label>
|
||||
<type>text</type>
|
||||
<help>Optional HTTP basic authentication details for Elasticsearch.</help>
|
||||
</field>
|
||||
<field>
|
||||
<id>output.elastic_timeout</id>
|
||||
<label>Timeout</label>
|
||||
|
||||
@@ -70,6 +70,12 @@
|
||||
<elastic_url type="TextField">
|
||||
<Required>N</Required>
|
||||
</elastic_url>
|
||||
<elastic_username type="TextField">
|
||||
<Required>N</Required>
|
||||
</elastic_username>
|
||||
<elastic_password type="TextField">
|
||||
<Required>N</Required>
|
||||
</elastic_password>
|
||||
<elastic_timeout type="IntegerField">
|
||||
<default>5</default>
|
||||
<Required>N</Required>
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user