Commit Graph

6 Commits

Author SHA1 Message Date
stuart nelson 19715022a4
[amtool] update silence add and update flags (#1298)
* Update silence add/update flags

- Change --expires/-e to --duration/-d
- Change --expires-on to --end
- Add --start

* update subcommand returns ID of new silence

The silences printed before were accurate, except
they had the old ID. Now the new ID is returned.

* Duration is added to silence.StartsAt

When a user supplies a duration to update a
silence, it is applied to silence.StartsAt after
any potential changes to the silence's start time.
2018-03-29 12:11:31 +02:00
pasquier-s e8a92f65ef Run staticcheck as part of the build process (#1264)
This change also fixes potential issues highlighted by running
staticcheck.
2018-02-28 17:42:32 +01:00
benbradley 0db01af11e amtool silence update support dwy suffixes to expire flag (#1197) 2018-01-15 19:45:46 +01:00
Colin Douch 17846f2e33 Fix updating silence comments (#1189)
Possibly another regression introduced by #976 . We use the wrong
variable to update comments in the `amtool silence update` command
which causes us to fail silently. This fixes that.
2018-01-10 17:05:03 +01:00
Calle Pettersson 608848390f Switch amtool to kingpin (#976)
* Switch cmd/amtool to kingpin

* Touch-ups

* Implement long help

* Add missing short-form of --output

* Fix backwards compatibility for config file options

* Fix vendoring

* Review fixes

* Fix flag word order
2017-12-22 11:17:13 +01:00
Binh Le dbff31dbf1 [amtool] - Add new command to update silence (#1123)
This adds a new command, update (and also its alias, extend), to update
existing silence in Alertmanager. User can use this command to update the
expiration or comment on existing silences. The API already support this
so I only expose the same functionality to amtool.

Don't allow update CreatedBy field as it is "Created" not "Updated", so
we should keep the original author.
2017-12-11 14:46:59 +01:00