influxdata / influxdata/kapacitor
Deadman - False Triggers
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
There seem to already be a few issues open on the deadman firing falsely. In my case I even see times where the deadman fires indicating it received a single point, which should have meant it would have passed that check.
```
"moarcanary-auth": No Data Check - CRITICAL
1.00 points received in 5m
```
and in the logfile, it appears there is at least 1 point
```
{
"id": "nil:where2 for task 'moarcanary-auth'",
"message": "\"moarcanary-auth\": No Data Check - CRITICAL\n 1.00 points received in 5m",
"details": "{"Name":"stats","TaskName":"moarcanary-auth","Group":"nil","Tags":null,"ID":"nil:where2 for task 'moarcanary-auth'","Fields":{"emitted":1},"Level":"CRITICAL","Time":"2016-09-23T14:50:00Z","Message":"\\"moarcanary-auth\\": No Data Check - CRITICAL\\n 1.00 points recieved in 5m"}\n",
"time": "2016-09-23T14:50:00Z",
"duration": 0,
"level": "CRITICAL",
"data": {
"series": [
{
"name": "stats",
"columns": [
"time",
"emitted"
],
"values": [
[
"2016-09-23T14:50:00Z",
1
]
]
}
]
}
}
```
My tick script is as follows
```
var data = stream
|from()
.database(database)
.retentionPolicy(retention_policy)
.measurement(metric_name)
|where(lambda: "deployment" == deployment)
//|log()
data
|deadman(1.0, 5m)
.message('"{{ .TaskName }}": No Data Check - {{.Level}}
{{ index .Fields "emitted" | printf "%0.2f" }} points received in 5m')
.log('/tmp/moarcarnay.log')
.slack()
.channel(slack_channel)
data
|window()
.period(5m)
.every(30s)
|mean('value')
.as('mean_value')
//Slack
|alert()
.stateChangesOnly()
.message('{{.TaskName}} {{ .Level }}
Got a value of {{ index .Fields "mean_value" }} -- Expecting == 1.0')
.warn(lambda: "mean_value" < 1.0)
.crit(lambda: "mean_value" < 1.0)
.slack()
.channel(slack_channel)
//OpsGenie
|alert()
.stateChangesOnly()
.message('{{ .TaskName }} {{ .Level }}
Got a value of {{ index .Fields "mean_value" }} -- Expecting == 1.0')
.crit(lambda: "mean_value" < 1.0 AND callout == TRUE)
.slack()
.channel(slack_channel)
.opsGenie()
.teams(opsgenie_team)
.recipients([ opsgenie_recipients ])
```
In other cases I see that I received 10 points in 5m, which is double the possible number I should receive.
```
{
"id": "nil:where2 for task 'moarcanary-auth'",
"message": "\"moarcanary-auth\": No Data Check - OK\n 10.00 points recieved in 5m",
"details": "{"Name":"stats","TaskName":"moarcanary-auth","Group":"nil","Tags":{"deployment":"staging","host":"ecs-a-ancillary-0-002.internal.staging.iot.blackberry.com","metric_type":"gauge","region":"us-east-1"},"ID":"nil:where2 for task 'moarcanary-auth'","Fields":{"emitted":10},"Level":"OK","Time":"2016-09-23T14:55:00Z","Message":"\\"moarcanary-auth\\": No Data Check - OK\\n 10.00 points recieved in 5m"}\n",
"time": "2016-09-23T14:55:00Z",
"duration": 300000000000,
"level": "OK",
"data": {
"series": [
{
"name": "stats",
"tags": {
"deployment": "staging",
"host": "ecs-a-ancillary-0-002.internal.staging.iot.blackberry.com",
"metric_type": "gauge",
"region": "us-east-1"
},
"columns": [
"time",
"emitted"
],
"values": [
[
"2016-09-23T14:55:00Z",
10
]
]
}
]
}
}
```
I am using the HTTP subscription method and influxdb 1.0.0/ kapacitor 1.0.0
The other issues open don't seem to have a resolution so figured I would share my situation as it is of a slightly different pattern.
I will continue to see if I can debug this further to aid in the resolution.
Contributor guide
Research direction
Start with the supplied TICKscript, especially the deadman(1.0, 5m) node, and reproduce the behavior using the HTTP subscription with InfluxDB 1.0.0 and Kapacitor 1.0.0. Compare the emitted counts in the deadman log output with the points received in the five-minute window; done means the false triggers and impossible counts are explained and corrected or conclusively documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100