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


Recommended Posts

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

  • Like 1
Link to comment
  • 4 weeks later...

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.

Link to comment
  • 2 weeks later...
  • 3 weeks later...
  • 4 weeks later...
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.

Link to comment
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

 

 

Link to comment
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.

Link to comment
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

Link to comment
  • 4 months later...
  • 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?

 

 

Link to comment
  • 2 weeks later...
  • 9 months later...

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.