Hello. I am capturing alert payload coming via external webhook API.
endsAt comes as - "endsAt":"0001-01-01T00:00:00Z"
startsAt comes as is - "startsAt":"2022-12-08T20:03:30+05:30"
What is the reason behind this? I am converting the payload into byte slice by passing the request body to io.ReadAll
, and then unmarshaling it using json.Unmarshal
.
startsAt retains its time value but not endsAt. Both of their types are string during unmarshaling.
How can I resolve this? I need values of startsAt and endsAt both.
Can these values otherwise be passed in Annotations, assuming dates will not get wrongly interpreted from there. If so, please help with which value will I find them in ? My current annotations look like -
{{ range $k, $v := . }}
[Key:{{$k}},value:{{ $v }},ID:{{ $v.Labels.id }}]
{{ end }}
{{ end }}
Grafana version: 9.2.3
Thanks.