Documentation forAppOptics

Function: fill(set[], options={})

Given a sparse metric stream, fill() will "fill in" any missing data points with a value that you provide. The options map accepts the following:

  • value - A required parameter that must be a number or the special string last, which will repeat the last seen measurement value for the stream.
Copy
fill(s("AWS.ELB.HTTPCode_Backend_5XX", {}, {period: "60"}), {value: "0"})

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

Example 1:

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

composite-metric-no-fill

Let's use the fill() function to ensure a 0 value is rendered every 5 minutes (300 seconds) if no data is received:

Copy
fill(s("json.errors.count", {"@host": "prod.web*"}, {period: "300"}), {value: "0"})

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

composite-metric-fill

Example 2:

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

composite-last-fill-gaps

Here is the same graph with fill() applied to the metric, and setting the option value to last.

Copy
fill(s("json.errors.count", {"@host": "prod.web*"}, {period: "300"}), {value: "last"})

composite-last-fill

The last recorded value within the viewable graph is repeated for the remaining intervals. This function is not recommended to be used with alerts as the last value only applies to the viewable graph, and will not pull the last value of historical data.

The scripts are not supported under any SolarWinds support program or service. The scripts are provided AS IS without warranty of any kind. SolarWinds further disclaims all warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The risk arising out of the use or performance of the scripts and documentation stays with you. In no event shall SolarWinds or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the scripts or documentation.