Skip to content

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

Description

@gullevek

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}')

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions