zero_fill(set[])

Given a sparse metric stream, zero_fill() will “fill in” any missing data points with a value of 0. This function is an alias to fill, with the value parameter set to 0.

zero_fill(s("AWS.ELB.HTTPCode_Backend_5XX", {"name": "*"}, {period: "60"}))

In order for zero_fill() to work, the metric must have its period attribute set, or you must supply period to the series function.

Example:

In the graph below, the metric has multiple streams which report intermittently:

composite-metric-no-fill

If we were to divide this metric with another metric we would need to ensure both metrics report at a consistent interval. Let’s use the fill function to ensure a 0 value is rendered every 5 minutes (300 seconds) if no data is received:

zero_fill(s("json.errors.count", {"host": "*"}, {period: "300"}))

All streams now display a 0 value if no measurements are received.

composite-metric-fill