fabianonline Posted September 5, 2020 Posted September 5, 2020 "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. ;-) 1 Quote
corgan Posted September 28, 2020 Posted September 28, 2020 whats the different to the existing zabbix agent docker plugin? Quote
fabianonline Posted September 29, 2020 Author Posted September 29, 2020 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. Quote
corgan Posted October 10, 2020 Posted October 10, 2020 sounds great! Is this only version 5? im running still on 4.2.8 and didnt had the time to update. Quote
fabianonline Posted October 11, 2020 Author Posted October 11, 2020 Yes, this plugin contains zabbix agent version 5.0.2 at the moment. Quote
Johan Löfstedt Posted November 1, 2020 Posted November 1, 2020 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 Quote
putteg Posted November 25, 2020 Posted November 25, 2020 @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.... Quote
fabianonline Posted November 25, 2020 Author Posted November 25, 2020 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. Quote
putteg Posted November 25, 2020 Posted November 25, 2020 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 Quote
fabianonline Posted November 26, 2020 Author Posted November 26, 2020 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. Quote
putteg Posted November 27, 2020 Posted November 27, 2020 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 Quote
corgan Posted April 13, 2021 Posted April 13, 2021 i finally managed to update my zabbix server to the latest 5.2. Is this release zabbix_agent2 for 5.2? Quote
Korshakov Posted April 15, 2021 Posted April 15, 2021 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. Quote
scubanarc Posted May 21, 2021 Posted May 21, 2021 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? Quote
fabianonline Posted May 25, 2021 Author Posted May 25, 2021 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. Quote
putteg Posted May 25, 2021 Posted May 25, 2021 when you add the repositories you only do: # apt install zabbix-agent2 Quote
Pedan Posted May 30, 2021 Posted May 30, 2021 Just wanted to say that the plugins works fine with 5.0 LTS. Thank you for your awesome work! Quote
tampasmix Posted June 11, 2021 Posted June 11, 2021 Hi all, Just getting started how to monitor Unraid via Zabbix. Any news on Docker? Thanks Quote
SidebandSamurai Posted March 11, 2022 Posted March 11, 2022 @fabianonline As of 6.0.1 Agent 2 is available: https://www.zabbix.com/download_agents Quote
spyd4r Posted September 13, 2022 Posted September 13, 2022 By chance any update for a 6.0 agent? 2 Quote
Geck0 Posted May 7, 2024 Posted May 7, 2024 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. Quote
Recommended Posts
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.