- sudo
This template requires sudo
to be available inside the zabbix-agent container.
You can bind-mount the supplied sudoers config with:
-v ./sudoers/alias-chroot.docker:/etc/sudoers.d/alias-chroot:ro
.-v ./sudoers/reboot-required.docker:/etc/sudoers.d/reboot-required:ro
.
Bear in mind that this file should be owned by root and its permissions set to 0600
.
-
You obviously also need to make the script available as well:
-v ./zbx-reboot-required.sh:/zabbix/bin/zbx-reboot-required.sh
-
Don't forget the config:
-v ./zabbix_agentd.d/reboot-required.docker.conf:/etc/zabbix/zabbix_agentd.d/reboot-required.conf:ro
-
To be able to chroot inside the host you need mount the rootfs like so:
-v /:/rootfs:ro
.
- You need to install
sudo
:
opkg update && opkg install sudo
-
Copy
sudoers.d/reboot-required.openwrt
to/etc/sudoers.d/reboot-required
-
Copy
zbx-reboot-required.sh
to/etc/zabbix_zabbix_agentd.d/bin/zbx-reboot-required.sh
-
Copy
zabbix_agentd.d/reboot-required.openwrt.conf
to/etc/zabbix_zabbix_agentd.d/zbx-reboot-required.conf
-
Restart the agent:
/etc/init.d/zabbix_agentd restart
-
Import the template
zabbix_template_reboot_required.xml
-
Apply it to your hosts