1.6 KiB
1.6 KiB
title | description | menu | weight | aliases | introduced | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tickscript.defineCheck() function | The `tickscript.defineCheck()` function creates and returns a record with custom check data required by `tickscript.alert()` and `tickscript.deadman()`. |
|
302 |
|
0.111.0 |
The tickscript.defineCheck()
function creates and returns a record with custom check data required by
tickscript.alert()
and
tickscript.deadman()
.
This check data specifies information about the check in the InfluxDB monitoring system.
import "contrib/bonitoo-io/tickscript"
tickscript.defineCheck(
id: "000000000000",
name: "Example check name",
type: "custom",
)
Parameters
id
({{< req >}}) InfluxDB check ID.
name
({{< req >}}) InfluxDB check name.
type
InfluxDB check type.
Default is custom
.
Supported values:
- threshold
- deadman
- custom
Examples
Generate InfluxDB check data
import "contrib/bonitoo-io/tickscript"
tickscript.defineCheck(id: "000000000000", name: "Example check name")
// The function above returns: {
// _check_id: "000000000000",
// _check_name: "Example check name",
// _type: "custom",
// tags: {}
// }