greatcare / pm2-zabbix

A Node.js PM2 monitoring tool for Zabbix.
MIT License
87 stars 60 forks source link

Error Code 1 - Zabbix agent 2 #57

Open renatoanogueira opened 1 year ago

renatoanogueira commented 1 year ago

Hello, could you help me! I´m trying to make pm2-zabbix works but i can´t. I got the following error:

{"name":"pm2-zabbix","hostname":"ip-172-31-15-19","pid":3861865,"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 -\nzabbix_sender [3861937]: ./zabbix_agent2.d/plugins.d: [2] No such file or directory\n\n at ChildProcess.exithandler (node:child_process:397:12)\n at ChildProcess.emit (node:events:390:28)\n at maybeClose (node:internal/child_process:1064:16)\n at Socket. (node:internal/child_process:450:11)\n at Socket.emit (node:events:390:28)\n at Pipe. (node:net:687:12) {\n killed: false,\n code: 1,\n signal: null,\n cmd: '/usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --input-file -'\n}","time":"2022-10-21T16:20:02.162Z","v":0}

this problem runs if i start the pm2-zabbix service or if i run pm2-zabbix --monitor out of /etc/zabbix directory.

The test is being doing in a ubunt 20.04 with zabbix-agent2

johndegey commented 10 months ago

Hello,

First I have the same error msg with error code 1.

Trying with : /usr/bin/zabbix_sender --config /etc/zabbix/zabbix_agentd.conf --host "my_fqdn" --key "pm2.processes[my_app_name_for_pm2,status]" --value "online" -vv Give me this error zabbix_sender [3307338]: ERROR: 'ServerActive' parameter required

I've added this entry in my zabbix config. ServerActive=fqdn_of_my_zabbix_server

Now running pm2-zabbix --monitor --debug give me error code 2

Still in progress ;)