Hey,
The function for sending data only evaluates if the response from the Zabbix server was valid or not:
if resp.get('response') != 'success':
There are cases where the response is successful though actually sending the value failed:
[Dbg]>>> print resp.get('info')
processed: 0; failed: 1; total: 1; seconds spent: 0.000022
[Dbg]>>> print resp.get('response')
success
Maybe you could add another condition for the evaluation, something as simple as:
if resp.get('response') != 'success' or resp.get('info').find('failed: 1') != -1:
Thanks