influxdata / influxdata/kapacitor

Ping Alert does not seem to work

Open
#2,376 23 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

I have the tick script below registered in Kapacitor and the IP in question is not up, so the alert - I assume should immediately fire - but no alert is generated. Kapacitor is on it's own VM separate from Capacitor and Influx, which each have their own VMs also. kapacitor stats ingress output list stats for _kapacitor but nothing for chronograf or telegraf which makes me wonder if things are configured correctly or if this is a bug. The db connection does show up green for the kapacitor connection in the chronograf configuration however.

Chronograf version 1.1.11
Influx version 18.0
Kapacitor version 1.5.5

`var db = 'newyork'

var rp = 'autogen'

var measurement = 'ping'

var groupBy = []

var whereFilter = lambda: ("policy_group" == 'ny_vmware_prod') AND ("policy_name" == 'ny_ping_server') AND ("url" == '10.1.2.3')

var name = 'NY IP 10.1.2.3 Down'

var idVar = name

var message = ' {{.ID}} is {{.Level}} value: {{ index .Fields "value" }} '

var idTag = 'alertID'

var levelTag = 'level'

var messageField = 'message'

var durationField = 'duration'

var outputDB = 'chronograf'

var outputRP = 'autogen'

var outputMeasurement = 'alerts'

var triggerType = 'threshold'

var crit = 90

var data = stream
|from()
.database(db)
.retentionPolicy(rp)
.measurement(measurement)
.groupBy(groupBy)
.where(whereFilter)
|eval(lambda: "percent_packet_loss")
.as('value')

var trigger = data
|alert()
.crit(lambda: "value" > crit)
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)
.log('/var/log/chronograf/alerts.log')
.log('/var/log/kapacitor/alerts.log')
.log('/var/log/influxdb/alerts.log')

trigger
|eval(lambda: float("value"))
.as('value')
.keep()
|influxDBOut()
.create()
.database(outputDB)
.retentionPolicy(outputRP)
.measurement(outputMeasurement)
.tag('alertName', name)
.tag('triggerType', triggerType)

trigger
|httpOut('output')
`

Contributor guide

Open the contributing guide

Research direction

No repository file or test is named. Start by reproducing the tick script with the stated Chronograf, InfluxDB, and Kapacitor versions, then inspect Kapacitor's ingress stats and the listed alert log paths. Done means identifying why the ping data does not reach the alert and confirming that the alert is generated.

Written by the indexing model from the issue text.

Assessment

Domain
observability
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.