puppet-zabbix icon indicating copy to clipboard operation
puppet-zabbix copied to clipboard

Bootstrap agent2 support

Open fe80 opened this issue 2 years ago • 9 comments

  • Add param binary_location for specify zabbix agent binary (only for systemd)
  • Remove some parameters in zabbix agent configuration if it's zabbix agent2 package
    • LogRemoteCommands
    • StartAgents
    • MaxLinesPerSecond
    • AllowRoot
    • User
    • LoadModulePath

Pull Request (PR) description

This Pr bootstrap a support for zabbix-agent2 It's possible to use agent2 with this configration:

      'agent_configfile_path' => '/etc/zabbix/zabbix_agent2.conf',
      'include_dir'           => '/etc/zabbix/zabbix_agent2.d',
      'pidfile'               => '/var/run/zabbix/zabbix_agentd2.pid',
      'servicename'           => 'zabbix-agent2',
      'zabbix_package_agent'  => 'zabbix-agent2',
      'binary_location'       => '/usr/sbin/zabbix_agent2',

I actually not test with windows kernel (but I need it in few month)

This Pull Request (PR) fixes the following issues

#692

fe80 avatar Jun 30 '22 11:06 fe80

Hello @bastelfreak

I've also included a fix for EnableRemoteCommands, still available on zabbix agentd but not in zabbix agent2.

This fix a bug included in this merge request #767

fe80 avatar Jul 07 '22 09:07 fe80

Hello @bastelfreak

I've merge your master for fix Ci. I still have an error, but only on Debian 10 and on Zabbix server part. I can't read the full log on the fail only last 10 lines. I can't understand why it's fail.

fe80 avatar Sep 14 '22 08:09 fe80

Hi, I'm very interested in this PR, how can I help to get this merged? BR, Henrik

Henrik-Hansson avatar Nov 28 '22 11:11 Henrik-Hansson

Me too, This feature is exactly what I need 👍

marek130 avatar Nov 28 '22 11:11 marek130

If you go to the action there's a wheel icon on the top right (next to Search logs). There you can view the raw log where it shows this:

2022-09-14T08:00:13.2944101Z   Building dependency tree...
2022-09-14T08:00:13.2944431Z   Reading state information...
2022-09-14T08:00:13.2944867Z   E: Unable to locate package zabbix-sql-scripts
2022-09-14T08:00:13.2981126Z [00;00m[00;33m  Error: /Stage[main]/Zabbix::Server/Package[zabbix-sql-scripts]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install zabbix-sql-scripts' returned 100: Reading package lists...
2022-09-14T08:00:13.2982006Z   Building dependency tree...
2022-09-14T08:00:13.2982414Z   Reading state information...
2022-09-14T08:00:13.2982991Z   E: Unable to locate package zabbix-sql-scripts

Now it's also possible this is already failing on the master branch, but I hope it helps.

ekohl avatar Nov 28 '22 11:11 ekohl

I've merge master but it's fail on other spec fix on #850

fe80 avatar Nov 28 '22 13:11 fe80

@fe80 Please rebase (not merge commit) with master branch to fix the specs and move this forward. Thanks!

root-expert avatar Dec 12 '22 11:12 root-expert

This will need some documentation in README and maybe in REFERENCE using @example so it's transparent to users how to install agent v2 without the need to look at the code.

root-expert avatar Dec 20 '22 14:12 root-expert

Hello @root-expert ,

I added documentation, but rspec is fail since relase v9.0.0 of Apache module (Drop Apache 2.2 support). Do you want I fix this fail or you looking that to another MR ?

fe80 avatar Jan 03 '23 16:01 fe80