mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net-mgmt/zabbix-agent: Add PSK encryption (#1618)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
PLUGIN_NAME= zabbix-agent
|
||||
PLUGIN_VERSION= 1.6
|
||||
PLUGIN_VERSION= 1.7
|
||||
PLUGIN_COMMENT= Zabbix monitoring agent
|
||||
PLUGIN_DEPENDS= zabbix4-agent
|
||||
PLUGIN_MAINTAINER= opnsense@moov.de
|
||||
|
||||
+21
@@ -132,5 +132,26 @@
|
||||
<type>checkbox</type>
|
||||
<help><![CDATA[Enable logging of executed shell commands as warnings. Make sure to set the Debug Level accordingly.]]></help>
|
||||
</field>
|
||||
<field>
|
||||
<id>zabbixagent.settings.features.encryption</id>
|
||||
<label>PSK based encryption</label>
|
||||
<type>checkbox</type>
|
||||
<help>Enable PSK based encryption for communicating with the Zabbix server</help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>zabbixagent.settings.features.encryptionidentity</id>
|
||||
<label>PSK Identity</label>
|
||||
<type>text</type>
|
||||
<help>>The PSK identity configured must match on agent and server</help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>zabbixagent.settings.features.encryptionpsk</id>
|
||||
<label>PSK</label>
|
||||
<type>text</type>
|
||||
<help>The PSK configured on the Zabbix server</help>
|
||||
<advanced>true</advanced>
|
||||
</field>
|
||||
</tab>
|
||||
</form>
|
||||
|
||||
+15
-1
@@ -1,6 +1,6 @@
|
||||
<model>
|
||||
<mount>//OPNsense/ZabbixAgent</mount>
|
||||
<version>1.2.2</version>
|
||||
<version>1.2.3</version>
|
||||
<description>Zabbix monitoring agent</description>
|
||||
<items>
|
||||
<!-- local settings that should NOT be synced to another node -->
|
||||
@@ -132,6 +132,20 @@
|
||||
<default>0</default>
|
||||
<Required>Y</Required>
|
||||
</logRemoteCommands>
|
||||
<encryption type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>Y</Required>
|
||||
</encryption>
|
||||
<encryptionidentity type="TextField">
|
||||
<default></default>
|
||||
<Required>N</Required>
|
||||
<mask>/^.{1,128}$/</mask>
|
||||
<ValidationMessage>Should be a string between 1 and 128 characters.</ValidationMessage>
|
||||
</encryptionidentity>
|
||||
<encryptionpsk type="TextField">
|
||||
<default></default>
|
||||
<Required>N</Required>
|
||||
</encryptionpsk>
|
||||
</features>
|
||||
</settings>
|
||||
<userparameters>
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
zabbix_agentd.conf:/usr/local/etc/zabbix_agentd.conf
|
||||
rc.conf.d:/etc/rc.conf.d/zabbix_agentd
|
||||
sudo_rules:/usr/local/etc/sudoers.d/opnsense_zabbix_agent
|
||||
zabbix_agent.psk:/usr/local/etc/zabbix_agent.psk
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
{% if helpers.exists('OPNsense.ZabbixAgent.settings.features.encryption') and OPNsense.ZabbixAgent.settings.features.encryption != '' %}
|
||||
{% if helpers.exists('OPNsense.ZabbixAgent.settings.features.encryptionpsk') and OPNsense.ZabbixAgent.settings.features.encryptionpsk != '' %}
|
||||
{{ OPNsense.ZabbixAgent.settings.features.encryptionpsk }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
+11
@@ -38,6 +38,17 @@ BufferSend={{OPNsense.ZabbixAgent.settings.tuning.bufferSend}}
|
||||
BufferSize={{OPNsense.ZabbixAgent.settings.tuning.bufferSize}}
|
||||
MaxLinesPerSecond={{OPNsense.ZabbixAgent.settings.tuning.maxLinesPerSecond}}
|
||||
|
||||
{% if OPNsense.ZabbixAgent.settings.features.encryption == '1' %}
|
||||
{% if OPNsense.ZabbixAgent.settings.features.encryptionidentity != '' %}
|
||||
{% if OPNsense.ZabbixAgent.settings.features.encryptionpsk != '' %}
|
||||
TLSAccept=psk
|
||||
TLSConnect=psk
|
||||
TLSPSKFile=/usr/local/etc/zabbix_agent.psk
|
||||
TLSPSKIdentity={{ OPNsense.ZabbixAgent.settings.features.encryptionidentity }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
############ ADVANCED PARAMETERS #################
|
||||
|
||||
{% if helpers.exists('OPNsense.ZabbixAgent.aliases') %}
|
||||
|
||||
Reference in New Issue
Block a user