what agent did you use ?
systemctl edit zabbix-agent2.service
then add
[Service]
RuntimeDirectory=zabbix
RuntimeDirectoryMode=0755
systemctl daemon-reload
systemctl start zabbix-agent2
zabbix-agent2 is not installed, you are using zabbix-agent
Yes I know but the zabbix-agent doesnt work just on one server… I would like to know why… I will install/test zabbix-agent2 later…
upstream bug that you have to patch yourself
Maybe there’s an older testing version installed, you may try to reinstall nethserver-zabbix-agent with
yum reinstall https://mrmarkuz.dynu.net/mirror/devtest/nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm
EDIT:
Thanks to @stephdl who patched the agent to create the needed directory /var/run/zabbix/
and the server (removing old agent config) so if possible reinstall both to test the most recent versions.
There is another problem:
[root@srv1 ~]# yum reinstall https://mrmarkuz.dynu.net/mirror/devtest/nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm
Loaded plugins: changelog, fastestmirror, nethserver_events
nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm | 21 kB 00:00:00
Examining /var/tmp/yum-root-rFK2l5/nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm: nethserver-zabbix-agent-0.0.1-1.ns7.noarch
No package matched to remove: nethserver-zabbix-agent-0:0.0.1-1.ns7
Error: Problem in reinstall: no package matched to remove
BDW, it worked on a fresh installed server:
### HowTo-install-zabbix-monitoring-agent2 ###
# Install mrmarkuz repo:
yum -y install https://mrmarkuz.dynu.net/mirror/mrmarkuz/7/noarch/nethserver-mrmarkuz-0.0.1-5.ns7.noarch.rpm
# Install Zabbix 5.0 LTS repo:
yum -y install https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
# Install Zabbix agent/agent2:
yum -y install https://mrmarkuz.dynu.net/mirror/devtest/nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm
# Configure zabbix-agent2:
config setprop zabbix-agent status disabled
config setprop zabbix-agent2 status enabled
# Copy your plugins to the new folder of zabbix-agent2 (if you get custom plugins in your agent)
cp /etc/zabbix/zabbix_agentd.d/* /etc/zabbix/zabbix_agent2.d/
# The agent needs to know its server:
config setprop zabbix-agent2 ServerZabbix <my-server-ip-with-zabbix-agent-2>
signal-event nethserver-zabbix-agent-update
It seems nethserver-zabbix-agent is not installed.
Please try with yum install
instead of yum reinstall
.
[root@srv1 ~]# yum install https://mrmarkuz.dynu.net/mirror/devtest/nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm
Loaded plugins: changelog, fastestmirror, nethserver_events
nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm | 21 kB 00:00:00
Examining /var/tmp/yum-root-rFK2l5/nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm: nethserver-zabbix-agent-0.0.1-1.ns7.noarch
Marking /var/tmp/yum-root-rFK2l5/nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package nethserver-zabbix-agent.noarch 0:0.0.1-1.ns7 will be installed
--> Processing Dependency: zabbix-agent for package: nethserver-zabbix-agent-0.0.1-1.ns7.noarch
Loading mirror speeds from cached hostfile
* ce-base: mirrors.melbourne.co.uk
* ce-extras: mirrors.melbourne.co.uk
* ce-sclo-rh: mirrors.melbourne.co.uk
* ce-sclo-sclo: mirrors.melbourne.co.uk
* ce-updates: mirrors.melbourne.co.uk
* epel: mirror.nextlayer.at
* nethforge: mrmarkuz.dynu.net
* nethserver-base: mrmarkuz.dynu.net
* nethserver-updates: mrmarkuz.dynu.net
--> Processing Dependency: zabbix-agent2 for package: nethserver-zabbix-agent-0.0.1-1.ns7.noarch
--> Finished Dependency Resolution
Error: Package: nethserver-zabbix-agent-0.0.1-1.ns7.noarch (/nethserver-zabbix-agent-0.0.1-1.ns7.noarch)
Requires: zabbix-agent
Error: Package: nethserver-zabbix-agent-0.0.1-1.ns7.noarch (/nethserver-zabbix-agent-0.0.1-1.ns7.noarch)
Requires: zabbix-agent2
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
You may need to enable the zabbix repo.
yum --enablerepo=zabbix install https://mrmarkuz.dynu.net/mirror/devtest/nethserver-zabbix-agent-0.0.1-1.ns7.noarch.rpm
Everything is green, thank you! -
@stephdl - Please tell me what templates do you use on Nethserver with zabbix-agent2? I use these atm:
I use
ping (but not necessary)
module linux generic
I do not see the systemd template, you have to import it manually
Got it, thank you!
Released. Thanks for testing.
IDK, maybe this post
should be put there?