Documentation forAppOptics

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

Given an arbitrary number of series, performs the derivative on each series to return a set of equal length. This is generally useful when the specified series are absolute counters where each value is the previous value plus some delta and you want to examine the rate of change. The derivative operation results in a series where each value is the delta from the previous step in the original series. The options map may be included with the following key:

  • detect_reset - Boolean that toggles the method by which the delta from the previous sample is calculated. When set to false, the delta is calculated as the simple subtraction of current - previous. If set to true (the default) the counter is assumed to be always increasing and any time the current value is less than the previous value is considered a reset of the counter. When resets are encountered the delta is calculated as the current value, otherwise it’s current - previous as before.

Example:

The following expression returns the estimated AWS daily charges for the us-east-1 region by finding the derivative over 1 day (86400 seconds):

Copy
derive(
   series("AWS.Billing.EstimatedCharges.total",
      {"region": "*"},
      {function:"max",period: "86400"}),
      {detect_reset:"true"}
)

The chart displays the count of AWS.Billing.EstimatedCharges.total (total monthly charges) and the billing rate per day (created by the composite metric):

daily-estimated-charges

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.