-
Notifications
You must be signed in to change notification settings - Fork 61
Install on Ubuntu 16.04
Robert Kawecki edited this page Mar 17, 2017
·
1 revision
(Contributed in #10 by clarkritchie)
sudo apt-get install zabbix-sender
sudo npm install -g pm2-zabbix
# test: pm2-zabbix --discover
# run interactively: pm2-zabbix --monitor
This installed as /usr/bin/pm2-zabbix
-- not /usr/local/bin/pm2-zabbix
as in the examples. Also, the user is ubuntu -- not debian. So configure for systemd:
# swap debian for ubuntu and remove local from path
wget -qO - https://raw.githubusercontent.com/greatcare/pm2-zabbix/master/install/init/systemd/pm2-zabbix.service | sed 's/\/local//' | sed 's/debian/ubuntu/' | sudo tee /etc/systemd/system/pm2-zabbix.service
Edit sudoers
as per #1, adding:
zabbix ALL=(ALL:ALL) NOPASSWD: /usr/bin/pm2-zabbix
sudo systemctl enable pm2-zabbix
sudo systemctl start pm2-zabbix
# stop: sudo systemctl stop pm2-zabbix
# restart: sudo systemctl restart pm2-zabbix
Add the UserParameter
to Zabbix agent and restart:
wget -qO - https://raw.githubusercontent.com/greatcare/pm2-zabbix/master/install/zabbix-agent/pm2-zabbix.conf | sed s/debian/ubuntu/ | sudo tee /etc/zabbix/zabbix_agentd.d/pm2-zabbix.conf
sudo systemctl restart zabbix-agent
Here is a template Template App PM2 as exported from Zabbix 2.4.8. It's still work in progress -- but the Item prototypes work, I'm still tweaking/testing the Trigger prototypes.