influxdata / influxdata/kapacitor
Get unix timestamp from `time` var for alert messages.
- Dominant language
- Go
- Stars
- 2.4k
- Forks
- 479
- Avg merge
- 4d 16h
- Merged PRs (30d)
- 4
Description
The notification contains a link to a Grafana dashboard. Is there a way to add the timestamps to a link?
i.e.
`http://192.168.1.10:3000/dashboard/db/device_1_live?from=1462448901244&to=1462452501244`
My message now:
> .message('Cycle failed. Current cycle {{ index .Fields "Cycle" }}. Total cycles failed: {{ index .Fields "TestFailed" }}. Cycle failed on device Device_1. for details!')
I want to know if there is a way to calculate the value of from and to using TICK. I found something here but I don't know if this is what I need. If yes can you post an example? The ideea is that I want to add a link to Grafana to see some hardware metrics when a test fails and I need the timestamps. Thanks again.
From @bogdanveres in #508
Contributor guide
Research direction
Start with the TICK `.message` template shown in the issue and the Grafana dashboard URL parameters. Determine how alert timestamps can be exposed for use in `from` and `to`, then verify that a generated notification links to the intended time range.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, grafana
- Domain
- observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100