Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Plugin] [Beta-Testers wanted] Zabbix-agent

Featured Replies

"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. ;-)

  • 4 weeks later...

whats the different to the existing zabbix agent docker plugin?

 

  • 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.

  • 2 weeks later...

sounds great! Is this only version 5?

im running still on 4.2.8 and didnt had the time to update.

  • Author

Yes, this plugin contains zabbix agent version 5.0.2 at the moment.

  • 3 weeks later...

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

  • 4 weeks later...

@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....

  • 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 :D
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.

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

 

 

  • 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.

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

  • 4 months later...

i finally managed to update my zabbix server to the latest 5.2. Is this release zabbix_agent2 for 5.2?

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.

  • 1 month later...

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?

 

 

  • 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.

 

when you add the repositories you only do:
# apt install zabbix-agent2

 

 

Just wanted to say that the plugins works fine with 5.0 LTS. 
Thank you for your awesome work!

  • 2 weeks later...

Hi all,

Just getting started how to monitor Unraid via Zabbix.

 

Any news on Docker?

 

Thanks

  • 9 months later...
  • 6 months later...

By chance any update for a 6.0 agent?

  • 1 year later...

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.

  • 9 months later...

@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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.