-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"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 -"} #38
Comments
Turns out that the sudoers file pm2-zabbix-sudoers needs to pass and argument, as in: # On some systems (notably RHEL and CentOS), sudo is configured to require a tty |
I'm trying to make it work on CentOS 7, but it did not help me really @blueflametuna . :( My user who I want to use pm2-zabbix with is called "web". I added him to the zabbix group and added the liney you figured out. However, I'm still getting the error message.
Formatted it a bit, so it would be easier to read.... |
Not sure what you mean by "My user who I want to use pm2-zabbix with is called "web". I added him to the zabbix group ..." Do you not have a zabbix user? The line in /etc/sudoers: |
I also needed to create a nodejs host group on the zabbix server, and linked the PM2 template to that server. |
There is one more file that you need: UserParameter=pm2.processes,sudo -u appuser pm2-zabbix --discover |
Sorry if I wasn't clear about my setup. On my server, I have a 3rd user (who is called web) and he has pm2 installed and running the NodeJS applications. Not my main user, nor the root. So I don't really understand why would you need to create a host group with the template while you can just simply add the template to your actual host. Are you sure that is necessary? |
The template needs to be linked to the host. Whether individually, or via host group. That's just the way I did it. We have numerous nodejs servers. The zabbix agent running on the nodejs host needs to be able to connect with the zabbix server. Did you add the pm2-zabbix.conf file? Did you set the user to your pm2 user "web"? As in: |
I have read through the 18 open and 16 closed issues, many of them related to this error.
I have read the troubleshooting guide in the readme. I have tried changing the hostname configurations, but can't seem to make it take effect.
The entire message is:
{"name":"pm2-zabbix","hostname":"puppetagenttest","pid":17431,"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":"2019-11-07T16:10:44.327Z","v":0}
On the zabbix server, the host is called puppetagenttest. I have installed the PM2 template, and I can see the items for PM2 daemon (CPU, Memory, PID, status), but nothing for the pm2.processes.
Can anyone offer suggestions on how to further troubleshoot this issue? It seems very common.
The text was updated successfully, but these errors were encountered: