Recently I configured some passive checks in Zabbix. Now, I saw that some checks failed for some periods of time, but this is not clear when looking at the chart. It seems that the value was stable for the last week but in real performance went down and nobody recognized it.
Is there a way to send NULL to Zabbix to indicate that fetching of the data failed? And to add a trigger for this case? I'm currently using the command line tool zabbix_sender
to upload the results, but can change to an alternative.
In contrast, munin stops graphing 10 minutes after receiving the last value and the missing values are also not influencing the calculation of the average value.
Here you can see how the 'missing data' is displayed:
in the chart (I marked the 'missing data'):
in the 'Last data' table (the line is grayed out, but the value 'last check' shows almost the current time)
Btw: the same problems is in the icmppingsec[]
check which just returns 0 in case of an error. Not very helpful for graphing but at least this avoids false negatives.
The fact that you are using
zabbix_sender
implies that these items are of type "Zabbix trapper". With trapper items, the graphing behavior you described above is expected.Regular items of types like "Zabbix agent" and "Zabbix agent (active)" have update interval configured, so the frontend knows that data is expected to come, say, every 30 seconds. If there is no data for a period of 4 update intervals or so, the graphing tool does not draw lines for this period. So, in your case, if the items would be of any other type, the marked lines would not be drawn.
However, with trapper items, there is no update interval, so the frontend does not know how frequently data is expected to come. It may come each minute, each day, or at irregular intervals. So the current solution is to connect every two points in the graph, and extend the first and last values to the border of the graph.
The behavior may be improved in future under https://support.zabbix.com/browse/ZBX-3356 .
In fact, it is possible. But this can change in a future version, because I think it's a bug in Zabbix:
If you change the item type to 'Zabbix agent (active)' (instead of 'Zabbix trapper'), you can set the 'Update interval (in sec)' and this will work as expected, even when using zabbix_sender instead of the agent.
The reason for this: Zabbix agent and zabbix_sender use the same protocol (there are only minor differences like the string "sender data" vs. "agent data" in the "request" field). Additionally, Zabbix doesn't seem to check the origin of agent data nor does it check the protocol string, so zabbix_sender can even be run on any host to push active zabbix agent results - and after a while (i measured about 2-3 times the update interval), the graph line stops as expected, if there is no data anymore.
The only one disadvantage of this solution: You cannot use 'Allowed hosts' option anymore.