Gauge is an object for representing a custom metric holding only the latest value added. It is one of the four custom metrics.
Parameter | Type | Description |
---|---|---|
name | string | The name of the custom metric. |
isTime | boolean | A boolean indicating whether the values added to the metric are time values or just untyped values. |
Method | Description |
---|---|
Gauge.add(value, [tags]) | Add a value to the gauge metric. Only the latest value added will be kept. |
Gauge usage in Thresholds
When gauge is used in a threshold expression, the variable must be called value (lower case). For example:
- value < 200
- value > 1
Examples
gauge-metric.js
gauge-threshold.js