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
I expected a silence starting at 2021-10-31T12:00:00.000Z and ending at 2021-10-31T14:00:00.000Z
Remark: In the Alertmanager GUI the endtime is already calculated from the duration in the browser.
Endtime is here mandatory for submit action. So here we do not face this problem. I haven't check the alertmanager API.
What did you see instead? Under which circumstances?
Abort with error amtool: error: silence cannot start after it ends
When execution + duration > start timestamp, a silence is created ending at 20d from now.
Environment
System information:
insert output of uname -srm here
Alertmanager: Linux 3.10.0-1127.19.1.el7.x86_64 x86_64
amtool:
I think we can say this is a bug of amtool. If we pass --duration to amtool silence add, it calculates endsAt not as startsAt + duration, but as time.Now() + duration.
When the --duration option was impelmented, amtool silence update was implemented to calculate endsAt as startsAt + duration (ref), but amtool silence add was not.
I'll send a patch to change this behavior.
I haven't check the alertmanager API.
Alertmanager API v2 does not prepare the duration option.
What did you do?
I want to create a silence for 2h in the future via
What did you expect to see?
According to
amtool --help-long
theI expected a silence starting at 2021-10-31T12:00:00.000Z and ending at 2021-10-31T14:00:00.000Z
Remark: In the Alertmanager GUI the endtime is already calculated from the duration in the browser.
Endtime is here mandatory for submit action. So here we do not face this problem. I haven't check the alertmanager API.
What did you see instead? Under which circumstances?
Abort with error
amtool: error: silence cannot start after it ends
When execution + duration > start timestamp, a silence is created ending at 20d from now.
Environment
System information:
insert output of
uname -srm
hereAlertmanager:
Linux 3.10.0-1127.19.1.el7.x86_64 x86_64
amtool:
Alertmanager from status GUI:
not relevant
not relevant
not relevant
no log entries created for these amtool calls.
The text was updated successfully, but these errors were encountered: