September 5, 20205 yr "Zabbix is the ultimate enterprise-level software designed for real-time monitoring of millions of metrics collected from tens of thousands of servers, virtual machines and network devices. Zabbix is Open Source and comes at no cost." (https://www.zabbix.com) I'm using Zabbix to monitor my machines and VMs and stuff. I also wanted to monitor my UnRAID server using it. To do this, you need to have the zabbix_agent installed and running. To do this, I've written a plugin. It includes the zabbix_agent (statically linked binary directly from https://www.zabbix.com/download_agents), the stuff needed to have it run on boot as well as a few scripts to get information from UnRAID. I'm using the plugin myself and have installed, updated and uninstalled it lots of time and everything seems to work just fine. But since this is my first plugin, I'd be happy to have one or two other users who know what they're doing and risking have a look at it first. Please only continue on if you know what you're doing! The source code and stuff can be found at https://git.schle.nz/fabian/unraid-zabbix_agent. The Plugin file for installation in UnRAID is https://git.schle.nz/fabian/unraid-zabbix_agent/raw/branch/main/zabbix_agent.plg For easy integration into your Zabbix service, a template file is available at https://git.schle.nz/fabian/unraid-zabbix_agent/raw/branch/main/zabbix_template.xml Thanks. ;-)
September 29, 20205 yr Author Docker containers are great because they provide an isolated environment for apps to run in. But for monitoring the whole system, I want the tool that's doing the monitoring (zabbix_agent in this case) to be able to monitor as much of the system as possible. The docker container you mentioned solved this by using privileged mode and the instructions tell you to make the disks available to the container. That way, that isolation I mentioned earlier is not really given any more. I think, in this case a natively running app is of more use than a container. Also, my plugin provides some scripts for zabbix to monitor UnRAID features and VMs and stuff which (at least during my quick search for it) isn't the case for the docker container.
October 10, 20205 yr sounds great! Is this only version 5? im running still on 4.2.8 and didnt had the time to update.
November 1, 20205 yr Awsome man! I have been pondering how to monitor all my docker containers in unraid for ages now since the docker agents only can monitor file systems. I installed this but where do i find the agent config file? it is running but no idea where the config files is
November 25, 20205 yr @fabianonline Thnx for this plugin :D But I have a question, wouldn't it be better to build this for Zabbix 5.2? Anyway, good effort....
November 25, 20205 yr Author On 11/1/2020 at 7:32 AM, Johan Löfstedt said: I installed this but where do i find the agent config file? it is running but no idea where the config files is The agent config file is at /boot/config/plugins/zabbix_agent/zabbix_agentd.conf. But it will be overwritten by an update... Today I've released version 2020.11.25.1, which allows you to add your own config snippet at /boot/config/plugins/zabbix_agent/zabbix_agentd.custom.conf. This file will be included by the main config and is guaranteed to not be overwritten by an update of the plugin. If you're adding your own UserParameters, please be aware that the list of allowed keys is very strict. So, in order to be allowed to access your custom UserParameters, you can either: Prefix them with "custom.", e.g. UserParameter=custom.test,echo "Hello World" Add it to the Allowlist using "AllowKey". 2 hours ago, putteg said: @fabianonline Thnx for this plugin But I have a question, wouldn't it be better to build this for Zabbix 5.2? Anyway, good effort.... Erm... yes. I somehow missed the release of 5.2... I've pushed version 2020.11.25.1 which includes zabbix_agent 5.2.1.
November 25, 20205 yr 10 hours ago, fabianonline said: The agent config file is at /boot/config/plugins/zabbix_agent/zabbix_agentd.conf. But it will be overwritten by an update... Today I've released version 2020.11.25.1, which allows you to add your own config snippet at /boot/config/plugins/zabbix_agent/zabbix_agentd.custom.conf. This file will be included by the main config and is guaranteed to not be overwritten by an update of the plugin. If you're adding your own UserParameters, please be aware that the list of allowed keys is very strict. So, in order to be allowed to access your custom UserParameters, you can either: Prefix them with "custom.", e.g. UserParameter=custom.test,echo "Hello World" Add it to the Allowlist using "AllowKey". Erm... yes. I somehow missed the release of 5.2... I've pushed version 2020.11.25.1 which includes zabbix_agent 5.2.1. It would be great if you pushed zabbix_agent2 instead, because then you can monitor dockers also. I don't want to be pain in the... But zabbix_agent2 is the newest. Keep up the good work
November 26, 20205 yr Author 8 hours ago, putteg said: It would be great if you pushed zabbix_agent2 instead, because then you can monitor dockers also. I don't want to be pain in the... But zabbix_agent2 is the newest. Keep up the good work I would - if there was a static build of zabbix_agent2 available for download at zabbix.com. Currently, there isn't one. Otherwise, I would. I'll have a look into either getting a build of zabbix_agent2 from somewhere else - or alternatively add a few scripts to generate docker data.
November 27, 20205 yr On 11/26/2020 at 6:46 AM, fabianonline said: I would - if there was a static build of zabbix_agent2 available for download at zabbix.com. Currently, there isn't one. Otherwise, I would. I'll have a look into either getting a build of zabbix_agent2 from somewhere else - or alternatively add a few scripts to generate docker data. OK, I got mine from https://github.com/zabbix/zabbix-docker But now I use your latest build of zabbix_agent1 Thnx
April 13, 20215 yr i finally managed to update my zabbix server to the latest 5.2. Is this release zabbix_agent2 for 5.2?
April 15, 20215 yr Will definitely try it, because I use Zabbix to monitor over 200 different hosts. Zabbix Agent 2 would be a sweet addition as it would finally resolve my issue how to monitor docker containers on Unraid.
May 21, 20215 yr Thank you so much! This works perfectly on 6.9.0 with an intel x64 cpu. The template was a nice touch. I agree with everyone in here that Zabbix Agent 2 is necessary since so many people use their unraid servers as a docker host. @fabianonline, any chance we'll get agent 2 in the near future?
May 25, 20215 yr Author I would love to switch to agent2 - but as of now there is no Download option for agent2 at https://www.zabbix.com/download_agents. As long as there is no agent2 download provided there, I can't do anything, I think.
May 30, 20215 yr Just wanted to say that the plugins works fine with 5.0 LTS. Thank you for your awesome work!
June 11, 20215 yr Hi all, Just getting started how to monitor Unraid via Zabbix. Any news on Docker? Thanks
March 11, 20224 yr @fabianonline As of 6.0.1 Agent 2 is available: https://www.zabbix.com/download_agents
May 7, 20242 yr Looks like Fabian discontinued this project. Any updates or forks that can be used? I've been looking at Wazuh, but stumbled upon this. I wanted Opnsense to integrate as well.
February 25, 20251 yr @fabianonline I'm not sure why but for some reason the combination of read and process substitution in the following line contained in the disk.sh script leads to disk.sh becoming a <defunct> zombie process each time it is called which eventually results in my server hitting the "max user processes" limit thereby preventing any new processes from being forked: read bytes_read bytes_written _ < <(grep $device"=" /var/local/emhttp/diskload.ini | cut -d"=" -f2) I was able to prevent disk.sh from becoming a zombie by replacing the problematic line (and the subsequent line) with the following line which uses awk instead of "read <()": grep $device"=" /var/local/emhttp/diskload.ini | cut -d"=" -f2 | awk '{print "\"bytes_reading\":"$1", \"bytes_writing\":"$2"}"}'
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.