puppet-zabbix
puppet-zabbix copied to clipboard
zabbix::userparameters: Class ::zabbix::agent has not been evaluated
Affected Puppet, Ruby, OS and module versions/distributions
- Puppet: 3.8.7, 4.6.1
- Ruby: 2.0.0p598
- Distribution: CentOS 7.2
- Module version: 2.4.1rc0
How to reproduce (e.g Puppet code you use)
class { '::zabbix::agent':
server => 'zabbix.example.com',
zabbix_version => '2.4',
serveractive => 'zabbix.example.com',
manage_firewall => false,
}
zabbix::userparameters {'ESzabbix':
content => 'UserParameter=ESzabbix[*],/opt/zabbix/ESzabbix.pl $1 $2',
}
What are you seeing
Error: Failed to apply catalog: Parameter path failed on File[class ::zabbix::agent has not been evaluated/ESzabbix.conf]: File paths must be fully qualified, not 'class ::zabbix::agent has not been evaluated/ESzabbix.conf' at /etc/puppetlabs/code/environments/production/modules/zabbix/manifests/userparameters.pp:79
What behaviour did you expect instead
For it to work :)
Output log
See above.
Any additional information you'd like to impart
This was working as-is in a previous version.
I've tried adding require for the earlier module and for zabbix:;agent, as well as adding definitions for include_dir and include_dir_purge in zabbix:;agent with no success.
It appears to have been broken with the change to userparameters.pp in pull request #203, but unsure as of this moment.
This works, besides the Docker - Systemd problem, fine by now:
[root@669fb60a1f8f /]# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)
root@be8294d5f0a4:/# /opt/puppetlabs/bin/puppet module install puppet-zabbix --version 6.4.2
[root@669fb60a1f8f /]# rpm -i https://yum.puppetlabs.com/puppet5/puppet-release-el-7.noarch.rpm
warning: /var/tmp/rpm-tmp.B97LU5: Header V4 RSA/SHA512 Signature, key ID ef8d349f: NOKEY
[root@669fb60a1f8f /]# yum install puppet-agent
Loaded plugins: fastestmirror, ovl
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
puppet | 2.5 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/5): puppet/x86_64/primary_db | 126 kB 00:00:00
(2/5): base/7/x86_64/group_gz | 166 kB 00:00:00
(3/5): extras/7/x86_64/primary_db | 187 kB 00:00:00
(4/5): updates/7/x86_64/primary_db | 5.2 MB 00:00:00
(5/5): base/7/x86_64/primary_db | 5.9 MB 00:00:01
Determining fastest mirrors
* base: mirror.imt-systems.com
* extras: centos.intergenia.de
* updates: mirror.fra10.de.leaseweb.net
Resolving Dependencies
--> Running transaction check
---> Package puppet-agent.x86_64 0:5.5.6-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=====================================================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================================================
Installing:
puppet-agent x86_64 5.5.6-1.el7 puppet 20 M
Transaction Summary
=====================================================================================================================================================================================
Install 1 Package
Total download size: 20 M
Installed size: 20 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7/puppet/packages/puppet-agent-5.5.6-1.el7.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID ef8d349f: NOKEY==== ] 5.7 MB/s | 19 MB 00:00:00 ETA
Public key for puppet-agent-5.5.6-1.el7.x86_64.rpm is not installed
puppet-agent-5.5.6-1.el7.x86_64.rpm | 20 MB 00:00:02
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-release
Importing GPG key 0xEF8D349F:
Userid : "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <[email protected]>"
Fingerprint: 6f6b 1550 9cf8 e59e 6e46 9f32 7f43 8280 ef8d 349f
Package : puppet-release-1.0.0-1.el7.noarch (installed)
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-release
Is this ok [y/N]: y
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : puppet-agent-5.5.6-1.el7.x86_64 1/1
Verifying : puppet-agent-5.5.6-1.el7.x86_64 1/1
Installed:
puppet-agent.x86_64 0:5.5.6-1.el7
Complete!
[root@669fb60a1f8f /]# /opt/puppetlabs/bin/puppet module install puppet-zabbix --version 6.4.2
Notice: Preparing to install into /etc/puppetlabs/code/environments/production/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/etc/puppetlabs/code/environments/production/modules
└─┬ puppet-zabbix (v6.4.2)
├── camptocamp-systemd (v2.1.0)
├── puppet-selinux (v1.6.0)
├── puppetlabs-apache (v3.3.0)
├── puppetlabs-firewall (v1.12.0)
├─┬ puppetlabs-mysql (v6.1.0)
│ ├── puppet-staging (v3.2.0)
│ └── puppetlabs-translate (v1.1.0)
├── puppetlabs-pe_gem (v0.2.0)
├─┬ puppetlabs-postgresql (v5.9.0)
│ ├── puppetlabs-apt (v5.0.1)
│ ├── puppetlabs-concat (v4.2.1)
│ └── puppetlabs-stdlib (v4.25.1)
└── puppetlabs-ruby (v1.0.0)
[root@669fb60a1f8f /]# cat test.pp
class { '::zabbix::agent':
server => 'zabbix.example.com',
zabbix_version => '2.4',
serveractive => 'zabbix.example.com',
manage_firewall => false,
}
zabbix::userparameters {'ESzabbix':
content => 'UserParameter=ESzabbix[*],/opt/zabbix/ESzabbix.pl $1 $2',
}
[root@669fb60a1f8f /]#/opt/puppetlabs/bin/puppet apply test.pp
Notice: Compiled catalog for 669fb60a1f8f in environment production in 0.30 seconds
Notice: /Stage[main]/Zabbix::Repo/Yumrepo[zabbix]/ensure: created
Notice: /Stage[main]/Zabbix::Repo/Yumrepo[zabbix-nonsupported]/ensure: created
Notice: /Stage[main]/Zabbix::Agent/Package[zabbix-agent]/ensure: created
Notice: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.conf]/content: content changed '{md5}f2c976a2056c83e7dc3ec9613809a554' to '{md5}0311b9816e7aa0f2dab664b49bde43ef'
Notice: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.conf]/owner: owner changed 'root' to 'zabbix'
Notice: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.conf]/group: group changed 'root' to 'zabbix'
Notice: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.d]/owner: owner changed 'root' to 'zabbix'
Notice: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.d]/group: group changed 'root' to 'zabbix'
Notice: /Stage[main]/Zabbix::Agent/File[/etc/zabbix/zabbix_agentd.d/userparameter_mysql.conf]/ensure: removed
Notice: /Stage[main]/Zabbix::Agent/Zabbix::Startup[zabbix-agent]/File[/etc/systemd/system/zabbix-agent.service]/ensure: defined content as '{md5}0f9832795624802c3547e035e87e7829'
Notice: /Stage[main]/Systemd::Systemctl::Daemon_reload/Exec[systemctl-daemon-reload]/returns: Failed to get D-Bus connection: Operation not permitted
Error: /Stage[main]/Systemd::Systemctl::Daemon_reload/Exec[systemctl-daemon-reload]: Failed to call refresh: 'systemctl daemon-reload' returned 1 instead of one of [0]
Error: /Stage[main]/Systemd::Systemctl::Daemon_reload/Exec[systemctl-daemon-reload]: 'systemctl daemon-reload' returned 1 instead of one of [0]
Notice: /Stage[main]/Main/Zabbix::Userparameters[ESzabbix]/File[/etc/zabbix/zabbix_agentd.d/ESzabbix.conf]/ensure: defined content as '{md5}d57bf800941865a4064d07fd50867898'
Error: Systemd start for zabbix-agent failed!
journalctl log for zabbix-agent:
No journal files were found.
-- No entries --
Error: /Stage[main]/Zabbix::Agent/Service[zabbix-agent]/ensure: change from 'stopped' to 'running' failed: Systemd start for zabbix-agent failed!
journalctl log for zabbix-agent:
No journal files were found.
-- No entries --
Notice: /Stage[main]/Zabbix::Agent/Service[zabbix-agent]: Triggered 'refresh' from 5 events
Notice: Applied catalog in 6.72 seconds
I think it can therefore be closed.