Commit Graph

17 Commits

Author SHA1 Message Date
Jose Donizetti
7151cd4bfc Clean code style - amtool errors (#1099) 2017-11-12 11:43:48 -05:00
Binh Le
ea9a584e8d Allow 'd', 'w', 'y' to be specified at time suffix when creating silence (#1091)
The time.ParseDuration refused to parse them with the reason that a day
can be shorter or longer than 24 hours. But they are already accepted in
Prometheus range query and a custom parser is included in Prometheus
common package so there's no reason amtool cannot use that.

This will be handy in cases you need to create silence for longer periods,
which are unfortunately common.
2017-11-11 14:51:33 +01:00
Julius Volz
9b72c10134 Minor code cleanups 2017-11-01 23:08:34 +01:00
Corentin Chary
21a2e5393f cli/silence_add: don't ingore errors when getting current user (#1031)
I had a system where amtool would segfault on startup because of
that.
2017-10-09 10:10:27 +02:00
Jose Donizetti
fe390bc28a Improve amtool check-config use and description text (#1016) 2017-10-02 11:22:04 +02:00
Corentin Chary
25e4bb9965 amtool check-config (#978)
This is similar to `promtool check-config` and allows one
to validate the alertmanager configuration (as a git presubmit for example).

`govendor fetch github.com/spf13/{cobra,pflag}` was needed to
have support for `Args`.
2017-09-07 10:58:58 +02:00
Kellen Fox
09bc5dd8e5 Fixes #898 (#938)
Exit with error code from subcommands as well as root command
2017-08-02 23:04:07 +02:00
Matt Bostock
16232ce654 Update config file location in flag usage text (#895)
The config file location was changed in 305263e462. Update the flag usage text accordingly.
2017-07-05 13:09:03 +02:00
Frederic Branczyk
c4c0875ba3
fix config JSON marshaling 2017-06-08 13:37:57 +02:00
Kellen Fox
305263e462 Fixes #831 Move config file to a more consistent location and update docs 2017-06-03 14:12:43 -07:00
David Guerrero
1f346a6724 fixing a typo in amtool help text (#829) 2017-05-26 11:27:09 +01:00
Fabian Reinartz
5aff15b30f Merge pull request #773 from prometheus/fixalertstat
Fix alert status handling in UI
2017-05-09 10:09:24 +02:00
Kellen Fox
6aece86ac1 Fixes #746
Found that we are only defining MarshalJSON for the Regexp type for
references not for the direct object

Also took the time to simplify the json.Unmarshal usage in cli/config.go
2017-05-08 11:25:25 -07:00
Fabian Reinartz
8170206070 Fix alert status handling in UI 2017-05-08 12:56:03 +02:00
stuart nelson
6a909abf17 Add processing status field to alert 2017-04-27 14:18:52 +02:00
Kellen Fox
b2c656a071 Add command wrapper to handle printing errors for any subcommands (#724)
Fixes #721

I was using the RunE method of cobra.Command which does things with an
error returned from a function. I doesn't seem possible to keep it from
printing usage every time, so I've make a wrapper to use the other
function.
2017-04-21 14:50:02 +02:00
Kellen Fox
3aab66ec3a Amtool implementation (#636)
* Implement alertmanager cli tool 'amtool'

The primary goal of an alertmanager tool is to provide a cli interface
for the prometheus alertmanager.

My vision for this tool has two parts:
  - Silence management (query, add, delete)

  - Alert management (query, maybe more in future?)

Resolves: #567
2017-04-20 11:04:17 +02:00