Merge pull request #1578 from fraenki/za_sudo

net-mgmt/zabbix-agent: add sudo rule to grant root permissions
This commit is contained in:
Frank Wall
2019-11-18 10:40:30 +01:00
committed by GitHub
6 changed files with 23 additions and 5 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
PLUGIN_NAME= zabbix-agent
PLUGIN_VERSION= 1.5
PLUGIN_COMMENT= Enterprise-class open source distributed monitoring agent
PLUGIN_VERSION= 1.6
PLUGIN_COMMENT= Zabbix monitoring agent
PLUGIN_DEPENDS= zabbix4-agent
PLUGIN_MAINTAINER= opnsense@moov.de
@@ -81,6 +81,6 @@ function zabbixagent_xmlrpc_sync()
$result = array();
$result['id'] = 'zabbixagent';
$result['section'] = 'OPNsense.zabbixagent.settings';
$result['description'] = gettext('Enterprise-class open source distributed monitoring agent');
$result['description'] = gettext('Zabbix monitoring agent');
return array($result);
}
@@ -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>
@@ -1,7 +1,7 @@
<model>
<mount>//OPNsense/ZabbixAgent</mount>
<version>1.2.1</version>
<description>Enterprise-class open source distributed monitoring agent</description>
<version>1.2.2</version>
<description>Zabbix monitoring agent</description>
<items>
<!-- local settings that should NOT be synced to another node -->
<local>
@@ -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 %}