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

All scripts that rely on zabbix_sender 5.x need /^info/ changed to /^sent/ in shell scripts #63

Open
gullevek opened this issue Jun 2, 2020 · 1 comment

Comments

@gullevek
Copy link
Contributor

gullevek commented Jun 2, 2020

It seems in Zabbix 5.x the response from zabbix_sender application changed and the "info" string is no longer there it now looks like this "sent: 2; skipped: 0; total: 2"
so the info needs to replace with sent or a full string will be returned which is an invalid value for the field type numeric

from

response=$(echo "$result" | awk -F ';' '$1 ~ /^info/ && match($1,/[0-9].*$/) {sum+=substr($1,RSTART,RLENGTH)} END {print sum}')

to

response=$(echo "$result" | awk -F ';' '$1 ~ /^(info|sent)/ && match($1,/[0-9].*$/) {sum+=substr($1,RSTART,RLENGTH)} END {print sum}')
@pengbo0328
Copy link
Contributor

Thank you.

I am going to test your patch in Zabbix 5.x.

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