influxdata / influxdata/kapacitor

httpout node delay

Open
#1,731 3 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

Hi,
I created a test stream alert, I can see from the alert history that it is triggered every 5 seconds, but the end point only catches the http out post every 3 minutes. Is is designed this way? Can I get the httpout post in real time?

the TICK script is below for reference.

`var db = 'telegraf'

var rp = 'autogen'

var measurement = 'cpu'

var groupBy = []

var whereFilter = lambda: ("host" == 'iZtv1mmaqjxwusZ')

var name = 'test httpout'

var idVar = name + ':{{.Group}}'

var message = '123'

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: "usage_idle")
.as('value')

var trigger = data
|alert()
.crit(lambda: "value" > crit)
.stateChangesOnly()
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)
.post('http://localhost:9000/api/alerts/getChronografAlert')

trigger
|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

Start with the supplied TICK script, especially the alert() chain and the final httpOut('output') node, and reproduce the difference between the 5-second alert history and the endpoint's 3-minute posts. Trace how the httpout node handles the alert stream and determine whether the delayed delivery is expected or should be changed; done means the behavior is explained and the endpoint receives posts at the intended interval.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.