Instead of returning the octets value in your script, return some unique identifier for the zone that the conditional matches. Then on your visualization's x-axis you can do a terms agg on the scripted field which will get you the split by zone. The y-axis metric would be a simple sum aggregation on the octets field.
I have an early solution @Bargs . Directly in kibana visualize :
Sum of octets (X-axis), timestamp on Y-axis and split series by terms (so this is codes zones : z_code).
You can see that my graph is split into multiple curve (because it's have many code) :
But doesn't work these methods
In first case : it take only one of code
In second case : i have error message :[illegal_state_exception] Can't get text on a START_ARRAY
If you only need this grouping for this one visualization, why not use the filters aggregation with a query string? You could do something like the screenshot below. Instead of extension you would query on z_code.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.