equivalent of drawNullAsZero flag required for raw data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Graphite |
Fix Released
|
Low
|
Michael Leinartas |
Bug Description
the flag drawNullAsZero works well for graphical representation of data. When a user wishes to receive textual version of data this flag is of no help. The bug proposes a new function called transformNull() that allow Null/None data to be transformed to a static value. This can be combined with other filter functions to appropriately retrieve only "valid" data from graphite.
diff attached.
function help text:
Takes a metric or wild card seriesList and an optional value
to transform Nulls to. Default is 0. This method compliments
drawNullAsZero flag in graphical mode but also works in text only
mode.
Example:
.. code-block:: none
&target=
This would take any page that didn't have values and supply negative 1 as a default.
Any other numeric value may be used as well.
Changed in graphite: | |
status: | Fix Committed → Fix Released |
Thanks for this. I would like the readdress the motivation ... I was getting a ton of None values when a &format=json query was selected. I was hoping to not have these None values returned at all from the query (so I wouldn't have to filter them in the client.)
Would I use this patch with the currentAbove(xxx, 0) function (I'm assuming I can nest functions?)