Skip to content
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

Spaces in keys break zabbix-sender #27

Open
joppino opened this issue Jun 14, 2018 · 1 comment
Open

Spaces in keys break zabbix-sender #27

joppino opened this issue Jun 14, 2018 · 1 comment

Comments

@joppino
Copy link

joppino commented Jun 14, 2018

Here is an example. I'm simulating the parsing of the input from pm2-zabbix --monitor, which produces a key-value stream which is parsed by zabbix-sender and sent. I'm fetching just one row from this stream, and sending to zabbix:

echo "xxxxx-be-preprod01 pm2.processes[xxxxx Frontend-0,cpu] 90" | zabbix_sender -vv --config /etc/zabbix/zabbix_agentd.conf -s hostname --input-file -
zabbix_sender [25699]: DEBUG: answer [{"response":"success","info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000028"}]
info from server: "processed: 0; failed: 1; total: 1; seconds spent: 0.000028"

So, if there are spaces in pm2 process, the server fails to process the monitor part. The "discover" part is working, though, because if we enclose the key with double quotes, it goes through:

echo "xxxxxx-be-preprod01 "pm2.processes[xxxxx Frontend-0,cpu]" 90" | zabbix_sender -vv --config /etc/zabbix/zabbix_agentd.conf -s hostname --input-file -
zabbix_sender [25131]: DEBUG: answer [{"response":"success","info":"processed: 1; failed: 0; total: 1; seconds spent: 0.000083"}]
info from server: "processed: 1; failed: 0; total: 1; seconds spent: 0.000083"

@rkaw92
Copy link
Member

rkaw92 commented Oct 15, 2018

This is going to be addressed in PR #31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants