I would like to change the format of the “{{ .Duration }}” variable (hours, minutes, seconds),
to : years, days, hours, minutes, seconds.
Example:
.message('Last state change (duration) was {{ .Duration }}.')

Thanks
Anaisdg
2
Hello @Julien-IpD,
Welcome!
Unfortunately I don’t think that’s an option:
@Emrys_Landivar can you please confirm?
Thank you
Hello @Anaisdg,
Thank you for your reply.
How do we define the units on the .Duration variable?
The desired format: Days, Hours, Minutes, Secondes.
Thank you
Anaisdg
4
Hello @Julien-IpD,
I found:
Where:
Duration – the duration of the alert in nanoseconds.
So looks like maybe you can’t specify the format. I think I was wrong.
Hello @Anaisdg,
I found the same info. Thanks anyway.
It might be good to correct or clarify this in the documentation.
Can you make a feature request to the developers?
Thank you
Anaisdg
6
Hello @Julien-IpD,
I wouldn’t count on it. I’d suggest using Flux and 2.x instead.