Łukasz Mierzwa
ded69c11ff
Drop the path from v0.4 query args
...
This results in requests to 'GET http://localhost:9093/api/v1/silences?api/v1/silences?limit=2147483647 ' instead of 'GET http://localhost:9093/api/v1/silences?limit=2147483647 '. Too much copy&paste.
2018-01-25 19:34:35 -08:00
Łukasz Mierzwa
37364741ac
Merge pull request #222 from cloudflare/v04-silences
...
Allow passing query args to HTTP requests send to the Alertmanager API
2018-01-25 16:01:29 -08:00
Łukasz Mierzwa
0f73b20bc6
Allow passing query args to HTTP requests send to the Alertmanager API
...
Alertmanager 0.4.x silences endpoint uses pagination, code for this was incorrectly dropped in #216 , re-add it. Requires a way for mapper packages to signal the need for passing query args to HTTP requests
2018-01-24 19:09:02 -08:00
Łukasz Mierzwa
3f8368b8c2
Merge pull request #220 from cloudflare/vendor-updates
...
Vendor updates
2018-01-24 17:10:31 -08:00
Łukasz Mierzwa
1d1b7a4acb
Update nodejs dependencies
...
New release is around the corner, update vendored packages so we can test it before the cut
2018-01-24 17:00:28 -08:00
Łukasz Mierzwa
14b248de91
Update Go vendor packages
...
New release will be cut soon, update vendored packages before that to allow testing
2018-01-24 17:00:28 -08:00
Łukasz Mierzwa
a31b182e4d
Merge pull request #221 from cloudflare/tls-fix
...
Too many 'T' in NewHTTTPTransport
2018-01-24 14:12:50 -08:00
Łukasz Mierzwa
60b1c696a3
Too many 'T' in NewHTTTPTransport
2018-01-24 13:04:27 -08:00
Łukasz Mierzwa
0d228d2def
Merge pull request #207 from cloudflare/tls-auth
...
Add support for passing path to custom TLS CA cert & client key/cert …
2018-01-24 12:21:35 -08:00
Łukasz Mierzwa
a0cf3cc43c
Add a JSON tag for ProxyRequests attr
2018-01-23 21:38:46 -08:00
Łukasz Mierzwa
49d1ed2e1e
Pass HTTP transport to the proxy
...
When we proxy requests we should use same transport as we use when collecting alerts & silences
2018-01-23 21:37:56 -08:00
Łukasz Mierzwa
d5a7cb9ace
Rename Transport interface to Reader
2018-01-23 19:40:24 -08:00
Łukasz Mierzwa
6f89a77f8d
Rename 'transport' package to 'uri'
...
This package adds handlers for different URI schemes, name clashes with http.Transport which is now passed around. Rename it to make it more obvious what it does
2018-01-23 19:32:39 -08:00
Łukasz Mierzwa
338a4c38a6
Drop duplicated function
...
There's identical method on the Alertmanager instance that's being used
2018-01-23 19:22:50 -08:00
Łukasz Mierzwa
24335ebf1f
Add support for passing path to custom TLS CA cert & client key/cert pair
...
This adds support for passing a custom http.RoundTripper so in effect we can customize TLS client config for HTTPS requests.
Fixes #184
2018-01-23 19:22:12 -08:00
Łukasz Mierzwa
90a517bc9a
Merge pull request #216 from cloudflare/mapper-refactor
...
Mapper package refactoring
2018-01-22 11:39:19 -08:00
Łukasz Mierzwa
c7fb8db98d
Drop Release() from SilenceMapper
...
Not used
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
1f89ba05fe
Migrate rest of the code to new mapper and transport packages
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
6124196b0f
Finish refactoring mapper package
...
Fix bugs, add docstrings and let each mapper give us full url since it doesn't handle any http requests now (it just maps text to objects now)
2018-01-22 11:26:36 -08:00
Łukasz Mierzwa
2cf9253d3c
Refactor transport package
...
With this change we'll initialize Transport object for each Alertmanager and just call Read() on it when we need to use this transport to read from upstream Alertmanager
2018-01-22 11:26:35 -08:00
Łukasz Mierzwa
0b30a23c2a
Refactor mapper package responsibilities
...
Mapper should only take input, decode it and map onto internal model instances
2018-01-22 11:26:35 -08:00
Łukasz Mierzwa
1981898bd0
Merge pull request #218 from cloudflare/travis-build-only-master
...
Tell Travis CI to only build on pushes to the master branch
2018-01-21 17:47:08 -08:00
Łukasz Mierzwa
15a8446588
Tell Travis CI to only build on pushes to the master branch
...
I've noticed that Travis runs 2 builds for each open PR, that's because one build is triggered on push to a branch and another on opening the PR. It's possible to disable both triggers in Travis web UI but both option are desired, it's just that the push trigger should only fire on a push to the master so that we always run a build after any merge
See travis-ci/travis-ci#1147 for details
2018-01-21 17:35:12 -08:00
Łukasz Mierzwa
ab62379846
Merge pull request #217 from cloudflare/slim-travis
...
Make .travis.yml more DRY
2018-01-21 17:33:34 -08:00
Łukasz Mierzwa
fafe6d7bf1
Move lint docs stage closer to other lint stages
2018-01-20 23:19:58 -08:00
Łukasz Mierzwa
4fb7afa0bb
Use 'generic' language for docker stage
2018-01-20 23:08:01 -08:00
Łukasz Mierzwa
33f5d91044
Drop go_import_path from .travis.yml
...
Travis linter doesn't recognize this key and it's a global, which makes no sense with stages and anchors
2018-01-20 23:07:35 -08:00
Łukasz Mierzwa
a01cfd0f95
Use YAML anchors to deduplicate common stage variables
2018-01-20 23:05:44 -08:00
Łukasz Mierzwa
28e656fb48
Merge pull request #215 from cloudflare/markdown-lint
...
Markdown linter
2018-01-20 18:00:06 -08:00
Łukasz Mierzwa
68d58a24c1
Fix docs issues found by markdown linter
2018-01-20 13:10:31 -08:00
Łukasz Mierzwa
25e796f2ac
Add a make target and Travis CI stage for linting docs
...
Nobody wants borked markdown syntax in docs
2018-01-20 12:54:45 -08:00
Łukasz Mierzwa
764ccc2147
Merge pull request #214 from cloudflare/setup-proxy-via-env
...
Add a 'simplified mode' for configuration that can be used with only …
2018-01-15 16:58:33 -08:00
Łukasz Mierzwa
36178ee1ba
Add a 'simplified mode' for configuration that can be used with only one Alertmanager instance
2018-01-14 21:15:43 -08:00
Łukasz Mierzwa
63a0799263
Merge pull request #211 from cloudflare/am-0.13.0
...
Add Alertmanager 0.13.0 mock resposes for testing
2018-01-13 11:13:31 -08:00
Łukasz Mierzwa
c7a1c9b865
Add Alertmanager 0.13.0 mock resposes for testing
...
0.13.0 was released, add it to the list of tested versions
2018-01-12 15:47:38 -08:00
Łukasz Mierzwa
cfdd38c312
Merge pull request #209 from cloudflare/update-package-lock
...
Update package-lock.json using latest LTS nodejs/npm
2018-01-08 17:47:53 -08:00
Łukasz Mierzwa
4584a046ea
Update package-lock.json using latest LTS nodejs/npm
...
This adds optional deps that only work on OSX back to the lock file, previous npm versions were only adding it when run on OSX, now that it's fixed we should update the lock file so it doesn't show any diff when working on OSX
2018-01-08 16:25:19 -08:00
Łukasz Mierzwa
a3af1ec32d
Merge pull request #202 from cloudflare/proxy
...
Add support for proxying user connection to Alertmanager
2018-01-08 16:23:50 -08:00
Łukasz Mierzwa
983c7f50ee
Refactor NewAlertmanager() to not register new instance by default
...
This makes it easier to test code
2018-01-08 14:28:28 -08:00
Łukasz Mierzwa
efda91f542
Rename Alertmanager.Timeout -> Alertmanager.RequestTimeout
2018-01-08 13:51:38 -08:00
Łukasz Mierzwa
c8b7b3bcd0
Implement functional options, this time for real
2018-01-08 13:30:46 -08:00
Łukasz Mierzwa
2176c44ba7
Drop names in slices
2018-01-06 17:39:19 -08:00
Łukasz Mierzwa
6aec8bf5d1
Cleanup path setup a bit
2018-01-06 17:35:02 -08:00
Łukasz Mierzwa
db0d86f339
Don't modify path in the proxy, strip prefix in the handler
2018-01-06 17:28:03 -08:00
Łukasz Mierzwa
3eb28b3a6f
Use functional options pattern when creating Alertmanager instances
2018-01-06 17:19:05 -08:00
Łukasz Mierzwa
b6dd993c2b
Add support for proxying user connection to Alertmanager
...
Fixes #190 .
With this feature unsee can be configured to proxy requests to selected Alertmanager instances, if it's enabled unsee silence form will send a request via unsee rather than directly. This allows users to manage silences in environments where they have access to unsee but not to Alertmanager. Only silences endpoints on Alertmanager API are proxied.
2018-01-03 16:17:58 -08:00
Łukasz Mierzwa
4667b9e34c
Merge pull request #206 from cloudflare/silence-id
...
Show silence ID in the UI
2018-01-03 16:17:03 -08:00
Łukasz Mierzwa
2c53b323aa
Add missing depenency for test-js
...
npm install isn't run when test-js is executed on a fresh clone, so travis fails
2018-01-03 16:03:18 -08:00
Łukasz Mierzwa
c6288d27a2
Show silence ID in the UI
...
This adds silence ID to the list of rendered silence elements, clicking on it will allow to copy it to the clipboard. Fixes #203
2018-01-03 13:15:19 -08:00
Łukasz Mierzwa
f174ff2571
Merge pull request #205 from cloudflare/am-0.12
...
Add mock files for Alertmanager 0.12.0
2018-01-03 13:07:48 -08:00