voxpupuli / puppet-zabbix

Puppet module for creating and maintaining zabbix components with puppet.
https://forge.puppet.com/puppet/zabbix
Apache License 2.0
80 stars 227 forks source link

Errors after using module for zabbix agent 2 #971

Open KIvanov-1984 opened 4 months ago

KIvanov-1984 commented 4 months ago
  1. zabbix-agent-systemd.init.erb - in this file exec procces is zabbix_agentd, for zabbix agent 2 using bin file zabbix_agent2
  2. module delete /etc/zabbix/zabbix_agent2.d/plugin.d - plugins config path, it is should not be that
Valantin commented 4 months ago

Hi @KIvanov-1984 As I said in your previous issue, have you used the suggested code?

class { 'zabbix::agent':
  agent_configfile_path => '/etc/zabbix/zabbix_agent2.conf',
  include_dir           => '/etc/zabbix/zabbix_agent2.d',
  include_dir_purge     => false,
  zabbix_package_agent  => 'zabbix-agent2',
  servicename           => 'zabbix-agent2',
  manage_startup_script => false,
  server                => '192.168.20.11',
}

You must use the suggested code to run agent2 without the issue you report

amuckart commented 4 months ago

If you did have manage_startup_script set to true, you need to manually remove the old scripts, do a systemctl daemon-reload (assuming Linux & systemd) and then manually enable the services that were shipped with the packages.

IMO if you have manage_startup_script set to false, and manage_service set to true, the module should do this for you.