Skip to content

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

@gullevek

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

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