influxdata / influxdata/kapacitor
Post event handler
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
The post event handler posts JSON encoded data to an HTTP endpoint.
```
var trigger = data
|alert()
.crit(lambda: "value" > crit)
.message(message)
.id(idVar)
.idTag(idTag)
.levelTag(levelTag)
.messageField(messageField)
.durationField(durationField)
.post('http://localhost:8098/ymj')
.header('Content-Type', 'application/x-www-form-urlencoded')
```
why?I did not receive the message on the http side.
But,Message information in the alerts table
Contributor guide
Research direction
Start by reproducing the post event handler with the TICKscript shown and an HTTP endpoint that records requests. Inspect the handler's request construction and content-type behavior; done means the endpoint receives the expected JSON payload, while the alert still appears in the alerts table.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100