Open muslihmuslih opened 6 years ago
Exit code 1 essentially means that zabbix_sender
could not send the data. This is explained in the manpage of zabbix_sender
. Not much pm2-zabbix
can do in this situation - it is necessary to verify the configuration in /etc/zabbix/zabbix_agentd.conf
, and try sending some keys manually to the server to check connectivity.
What should I do? what configuration should I add in /etc/zabbix/zabbix_agentd.conf?
thank you
I have 1 server running pm2, and 1 server for the zabbix server. I installed zabbix_sender, zabbix_agent, pm2-zabbix on the server running pm2. Is that correct?
It's set up correctly w.r.t. process placement. You should check the agent config file on the server running pm2 - look at Server
and ServerActive
, as they need to point to your Zabbix server's address. You can also check connectivity with normal network tools such as ping
, netcat
etc.
pm2-zabbix --discover { "data": [ { "{#PROCESS_ID}": "server-0", "{#PROCESS_NAME}": "server" }, { "{#PROCESS_ID}": "index-1", "{#PROCESS_NAME}": "index" } ] }
pm2-zabbix --monitor {"name":"pm2-zabbix","hostname":"encoder","pid":17849,"level":50,"event":"PM2ZabbixMonitor#processListSendingError","error":{"killed":false,"code":2,"signal":null,"cmd":"/usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -"},"msg":"Failed to send process list with stats to server: Error: Command failed: /usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -\n","time":"2018-07-31T02:25:54.376Z","v":0}
My zabbix.agentd.cnf
pm2-zabbix --monitor {"name":"pm2-zabbix","hostname":"encoder","pid":17849,"level":50,"event":"PM2ZabbixMonitor#processListSendingError","error":{"killed":false,"code":2,"signal":null,"cmd":"/usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -"},"msg":"Failed to send process list with stats to server: Error: Command failed: /usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -\n","time":"2018-07-31T02:25:54.376Z","v":0}
Just add *Include=/etc/zabbix/zabbix_agentd.d/.conf** In - /etc/zabbix/zabbix_agentd.conf
i have error while run pm2-zabbix --monitor
{"name":"pm2-zabbix","hostname":"wowza","pid":32726,"level":50,"event":"PM2ZabbixMonitor#processListSendingError","error":{"killed":false,"code":1,"signal":null,"cmd":"/usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -"},"msg":"Failed to send process list with stats to server: Error: Command failed: /usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -\n","time":"2018-07-24T03:35:19.382Z","v":0}