Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zabbix-agent service not starting properly, missing variables in zabbix-agent.service file #266

Closed
ariacomputer opened this issue Aug 19, 2016 · 3 comments

Comments

@ariacomputer
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 2.4/3.0.4
  • Ruby: 2.0.0p598
  • Distribution: CentOS 7.2
  • Module version: 2.4.0 (off forge)

How to reproduce (e.g Puppet code you use)

class { '::zabbix::agent':
    server => 'zabbix.domainname.com',
    manage_firewall => false,
}

What are you seeing

The module, whether using Zabbix 2.4 or 3.0, is creating a second zabbix-agent.service file at /etc/systemd/system/zabbix-agent.service; the yum package uses /usr/lib/systemd/system/zabbix-agent.service. In addition, the template seems to not fill in several variables:

[Unit]
Description=Zabbix Agent
After=syslog.target network.target
Documentation=man:zabbix_agentd

[Service]
Type=forking
ExecStart=/usr/sbin/zabbix_agentd -c
Restart=on-abnormal
PIDFile=
PrivateTmp=yes
ProtectSystem=full
ProtectHome=yes

[Install]
WantedBy=multi-user.target

This does not allow the Zabbix agent to properly start.

What behaviour did you expect instead

Proper configuration of the .service file.

@ariacomputer
Copy link
Author

ariacomputer commented Aug 19, 2016

To follow up, it doesn't appear that the variables set in the zabbix::agent class are propagating down to the creation of the zabbix::startup type.

This also appears to be related to issue #264

bastelfreak added a commit that referenced this issue Aug 21, 2016
this is an approch to fix the issues from:
#267
#266

we workaround the wrong scoping by adding suitable params. We validate
each of them in the defined resource.
@bastelfreak
Copy link
Member

Hi @mSweetser,
The files in /etc are on purpose and meant to overwrite the ones provided by rpm packages. This is the way recommneded by the systemd devs.I'm not sure if the syntax for the very old systemd version in centos 7 is correct. Can you please test the fixes we added to our master branch?

@ariacomputer
Copy link
Author

Fixes appear to work properly; the zabbix-agent.service file was created with the proper variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants