RobinR1 / zbx-template-ipfire

Zabbix template for monitoring an IPFire appliance/instance
MIT License
7 stars 1 forks source link

Zabbix client #3

Closed StackKorora closed 2 years ago

StackKorora commented 2 years ago

Per: https://wiki.ipfire.org/addons/zabbix_agentd

This addon has not been updated since September 2019 (Zabbix Version 4.2.6). The creator of this Add-on is not able to provide updates anymore. Please consider supporting the IPFire Team by maintaining this addon.

I've started twice now to try and build a new agent. But time and life in general have prevented me from taking over. I personally would prefer agent2 (nearly all my infrastructure is now using agent2 features).

Have you considered a possible client update with this template?

RobinR1 commented 2 years ago

I have been in discussion with the people from IPFire for about a year now. I submitted a patch for an update to 5.0 (LTS) together with the userparameters and scripts from this template to have them built in.

But some valid security concerns came up about the need for iptables and addonctrl in the sudoers file. Also the perl script to determine the services state was rejected. Not my fault, but the code I used there is a copy from their services.cgi and they would rather have that code removed from IPFire all together than having it copied over once again due to the ugly methods used there to determine the services with hardcoded blacklists and so on.

About the iptables issues, this has been solved by reworking an ipfire provided binary getipstat. The services problem is still being worked on as this actually requires changes in the ipfire package manager and the metadata of addons to provide this information to third party components like the services web gui, zabbix agent, possibly nagios agent etc..

So, I have volunteered to take over maintenance of the zabbix_agentd addon and it is currently work in progress. And I have, actually yesterday, submitted a new patch for an update to 5.0.20, (including also your dhcp clients and captive portal clients userparameters). But without services discovery for now as that still requires work to IPFire core components.

About my choice to go with zabbix agent 1: I don't see any reason to switch to agent2 as I don't see any added value in it for IPFire. IPFire has no features that can't be monitored as easy with the old agent as with the new agent2. Also, IPfire is designed to be able to run on small appliances (And I actually run it on such one) therefore the footprint of the agent on IPFire is important and should be as small as possible; Agent 1 is just more lightweight than agent 2. For example, out-of-the-box agent 1 consumes about half of the memory that agent2 consumes. And I have no real measurements but derived from the fact that agent 1 is completely written in the low level language C and agent 2 in the high level language Go, Agent 2 probably has more overhead and requires more resources. It may be little, but even little matters on embedded devices.

Another choice I made is to go with the LTS version instead of the latest version since stability and security are the main focus points here. The chance that a security or stability issue is introduced in a latest versions is much bigger than in the LTS version. And again, I don't think there is much to win in using the latest version on IPFire instead of the LTS version.

So, sorry to probably disappoint you there, but I will not do an Agent2 for IPFire for a long time. If you really need it, you will still have to build it yourself. Agent 1 will however be maintained again in the near future; And I'm also working on a webgui plugin for it, so that may come too in the future, but indeed time and life in general keep interfering for now :-)

StackKorora commented 2 years ago

Wow! Awesome! You are way ahead of me then.

Good points for Agent1. For a lot of what I do the agent2 client-side buffering and the integrated plug-ins solve a ton of problems for me. But I think only the smartctl plugin would be useful and there are a few other good templates that can be used with agent 1 to get the same data.

Thank you so much for working on improving Zabbix/IPFire integration!