You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you do?
When creating a new silence in the future using amtool with the --start and --duration flags, the end date/time is calculated from the current time rather than the specified start time. See:
What did you expect to see?
End date/time for a new silence to be calculated from the time specified by the --start flag.
What did you see instead? Under which circumstances?
End date/time is always calculated from the current time. This is particularly notable when the --start time is more than --duration in the future, such as this example run at approximately 2021-02-24T14:00:00Z:
# amtool silence add alertname=testing --start=2021-02-24T23:00:00Z --duration=30m --comment=testing
amtool: error: silence cannot start after it ends
Environment
System information:
Linux 5.4.0-65-generic x86_64
Amtool version:
amtool, version 0.21.0 (branch: HEAD, revision: 4c6c03e)
build user: root@dee35927357f
build date: 20200617-08:54:02
go version: go1.14.4
(binary provided in unmodified quay.io/prometheus/alertmanager:v0.21.0 container)
Note: While I am not a golang programmer, if the maintenance team deems this to be a valid issue I might be interested enough to learn it so that I could contribute to the project.
The text was updated successfully, but these errors were encountered:
What did you do?
When creating a new silence in the future using amtool with the
--start
and--duration
flags, the end date/time is calculated from the current time rather than the specified start time. See:alertmanager/cli/silence_add.go
Line 125 in d57b2dc
What did you expect to see?
End date/time for a new silence to be calculated from the time specified by the
--start
flag.What did you see instead? Under which circumstances?
End date/time is always calculated from the current time. This is particularly notable when the
--start
time is more than--duration
in the future, such as this example run at approximately 2021-02-24T14:00:00Z:Environment
System information:
Linux 5.4.0-65-generic x86_64
Amtool version:
amtool, version 0.21.0 (branch: HEAD, revision: 4c6c03e)
build user: root@dee35927357f
build date: 20200617-08:54:02
go version: go1.14.4
(binary provided in unmodified quay.io/prometheus/alertmanager:v0.21.0 container)
Note: While I am not a golang programmer, if the maintenance team deems this to be a valid issue I might be interested enough to learn it so that I could contribute to the project.
The text was updated successfully, but these errors were encountered: