mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
net-mgmt/zabbix-agent: add option to grant sudo root access
This commit is contained in:
+7
@@ -55,6 +55,13 @@
|
||||
<help><![CDATA[Specifies the debug level for Zabbix agent.]]></help>
|
||||
<advanced>false</advanced>
|
||||
</field>
|
||||
<field>
|
||||
<id>zabbixagent.settings.main.sudoRoot</id>
|
||||
<label>Enable sudo root permissions</label>
|
||||
<type>checkbox</type>
|
||||
<help><![CDATA[When enabled, a sudo rule is created to grant full root access to Zabbix Agent. This may be required for certain checks.]]></help>
|
||||
<advanced>false</advanced>
|
||||
</field>
|
||||
</tab>
|
||||
<tab id="zabbixagent-settings-tuning" description="Tuning Parameters">
|
||||
<field>
|
||||
|
||||
@@ -63,6 +63,10 @@
|
||||
</OptionValues>
|
||||
<Required>Y</Required>
|
||||
</debugLevel>
|
||||
<sudoRoot type="BooleanField">
|
||||
<default>0</default>
|
||||
<Required>Y</Required>
|
||||
</sudoRoot>
|
||||
</main>
|
||||
<tuning>
|
||||
<startAgents type="IntegerField">
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
#
|
||||
# Automatically generated configuration.
|
||||
# Do not edit this file manually.
|
||||
{% if helpers.exists('OPNsense.ZabbixAgent.settings') and OPNsense.ZabbixAgent.settings.main.sudoRoot|default('0') == '1' %}
|
||||
zabbix ALL=(ALL) NOPASSWD: ALL
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user