Closed aredoff closed 7 months ago
I've got a branch with limited agent2 support here: https://github.com/jameskirsop/puppet-zabbix/tree/agent2
It needs some polishing before a PR can be created. Basically, switching out the zabbix_package_agent
parameter from zabbix_agent
to zabbix_agent2
will do a couple of things:
To standardise a little bit, I've changed the config and pid file names from zabbbix_agentd
(old version specific) to zabbix_agent
so that they'll appear correct regardless of the agent version that's being run on the system. This means the module should be easier to support in the future (less if statement blocks to determine version).
I'll need to put some more time in to complete the changes so that it's got more coverage, but if you're on a system that uses systemd
this may work for you.
PR's to my branch are welcome while I continue chipping away.
I've put work on this on hold until we get #743 done, so that at least I can test a working master release with my branch on top of it in my puppet environments.
@jameskirsop I'd like to test your changes, provide feedback and pullrequests (if needed) but could you please update your repo to the latest from master?
@Heidistein would it be more beneficial to just switch the manifest to install agent2 rather than increasing complexity to support both?
I have the following code working for redhat/centos https://github.com/shane-davidson/puppet-zabbix/tree/agent2
I have updated the debian/ubuntu service but have not tested it. my code will remove the old package (zabbix-agent) and install the new (zabbix-agent2)
only thing missing is plugin settings for the new agent which i can easily add.
Updating everything to zabbix-agent2 would also depend on a choco package so I have placed a request for the Zabbix guys to update the choco package to support zabbix-agent2 here: https://github.com/zabbix/zabbix-agent-chocolatey/issues/27
I certainly would be easyer and cleaner to just support agent2. However I dare not to choose the agent version for people (just yet). Guaranteed there will be a situation where agent2 is a problem, and agent itself is required. For example, hand in my own pocket, we still have ancient machines, used for the battles of Napoleon, for which there is no agent2 available (nor will there ever).
@Heidistein no worries. I have created a new branch here: https://github.com/shane-davidson/puppet-zabbix/tree/agent_agent2
It keeps all the same variables between agent and agent2 versions and switches between them with the bool $install_agent2 here
considerations:
$intall_agent2 == true
. I assume this is desired?$intall_agent2 == false
I have tested this in a centos/redhat environment. Let me know if there is anything you want me to add/fix up.
Share, great work. I will read your code after the weekend, sorry. Life happens.
Again, next week I will help you. I will make testcases and code for debian, allthough redhat is my street.
@Heidistein, I've just merged the latest changes from master onto my branch for you to test / PR against.
Some things I still need to work on / need guidance for /help with:
I also suggest we pull out the plugins
section from the module's configuration template and allow users to load in their own plugins configuration as required by using the Include
config parameter - and perhaps pre-creating a directory in the configuration root to contain these files as a helper.
Hello @jameskirsop. I have no relation with @Heidistein, but I am glad you completed the support of Agent2 on your fork. Thank you for this work! We have been testing it since last week and so far, there are only two glitches we found on Windows:
BTW, we had to create our own Chocolatey package, but that's another topic. We plan starting some tests soon on Linux systems.
Thanks @vincent-zurczak, I've added a commit to address those two issues for Windows.
hey I am interested in this and wondering if we are close to a choco package with zabbix agent 2
Hello, I am interested in this and wondering if this will be implemented? At least for Unix like OS's :-)
Hi, I'm also interested in support for zabbix-agent2.
Any ETA for this update?
Is there any update on this?
I'm very interested in switching to this module but only when you add 2nd agent support Any ETA for this update?
The current version of this module does not support Zabbix Agent 2. Agent 2 has much more functionality and we would like to switch to it. Please add new agent support to your wonderful module.