[ZBXNEXT-292] Handling of undefined items when evaluating calculated items Created: 2010 Apr 06 Updated: 2017 Nov 09 |
|
Status: | Open |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Server (S) |
Affects Version/s: | 1.8.2 |
Fix Version/s: | None |
Type: | Change Request | Priority: | Major |
Reporter: | Ivan Gusev | Assignee: | Alexei Vladishev |
Resolution: | Unresolved | Votes: | 28 |
Labels: | calculateditems, usability | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Zabbix marks calculated item as "Not supported" if expression contains item that currently has no value. It would be nice to change that behavior to something more usable. Calculated item: In other words UNDEFINED value for item should be considered as "0" in addition and subtraction operations and as "1" in multiply and division operations |
Comments |
Comment by Aleksandrs Saveljevs [ 2011 Mar 17 ] |
Related issues: ZBXNEXT-615, |
Comment by Vance Turner [ 2012 Jan 07 ] |
Not feature....Bug. Valid formulas should always express, even with no values, so a lack of value is as stated above 0 or 1 |
Comment by Jairo Alves [ 2012 Dec 11 ] |
Quoting a suggestion from a comment by Robert Foss in ZBXNEXT-615: " last(key, 0) == 0, If key is 'Not supported' |
Comment by Skylogic Spa [ 2013 Jan 11 ] |
Hello, I've run to into the same problem. The implementation of the IF function for the calculated item would solve this issue and add a very useful new feature at the same time. I'm running Zabbix 2.0.4. |
Comment by sergio cricca [ 2013 Jun 11 ] |
Same here on 2.0.6 Server and Agent. Better a solution by giving 0 IF nodata is received. |
Comment by Oleksii Zagorskyi [ 2014 Jun 05 ] |
As 2.2 got this: |
Comment by Noah Leaman [ 2014 Jun 07 ] |
Just so I'm clear, in 2.2, an internal event will now be created allowing you to be notified an item changed state from supported to unsupported, and any calc items that are using that value will become unsupported just like they do in previous versions? (and I assume that calc item will also create an internal event when changing to unsupported) If a calc item is averaging 10 item values among 10 different hosts, and one of those items becomes unsupported, the calc will become unsupported correct? If this is so, then there is no change in the way calc items behave. If this is the case, I think the feature request here should more specific to providing a way for calc items to behave differently based on user preference when encountering unsupported values: An option in the calc item form that directs how the calc item should behave when encountering a unsupported value. Some option examples: A) ignore any unsupported values and continue to calculate; Am I right that the way it will behave in 2.2 is only option C? |
Comment by richlv [ 2014 Jun 07 ] |
yes, only c is available and more specific approach could be helpful |
Comment by Strahinja Kustudic [ 2015 Feb 27 ] |
We constantly have problems with this when we apply templates to hosts which have calculated items, since if the calculated item is executed before the items from which it calculates data it becomes not supported, because there is no data from which to calculate. In this case we get an email notification that an item become not supported and after the "source" items fetch data, we get another notification that it become supported. Now multiply that by the number of calculated items and hosts, and you get a spam fest from Zabbix. It would really be nice to have some control over this as Noah described in option B). Also it would probably be a good idea to updated this issue description to include option B), since it gives you more control compared to what the issue reporter suggested. |
Comment by Glebs Ivanovskis (Inactive) [ 2017 Nov 09 ] |
Perl has "logical defined-or" operator // which is concise, yet explicit way of working around undefined values in expressions (option B). Option A is complete BS from mathematical point of view. |