Łukasz Mierzwa
aea6178ecb
Merge pull request #142 from cloudflare/update-docs
...
Minor README updates
v0.7.0
2017-07-11 07:40:37 -07:00
Łukasz Mierzwa
1414ed1428
Minor README updates
2017-07-10 22:11:46 -07:00
Łukasz Mierzwa
1ed1a0ba9c
Merge pull request #141 from cloudflare/fix-metric-labels
...
Fix inverted labels
2017-07-10 11:53:46 -07:00
Łukasz Mierzwa
c1645a2e8e
Fix inverted labels
2017-07-10 11:38:40 -07:00
Łukasz Mierzwa
4b3785ef00
Merge pull request #136 from cloudflare/unsilence-button
...
Allow unsilencing alerts from unsee UI
2017-07-10 11:31:57 -07:00
Łukasz Mierzwa
c666d633aa
Allow unsilencing alerts from unsee UI
2017-07-10 09:43:53 -07:00
Łukasz Mierzwa
276d34b0e0
Merge pull request #138 from cloudflare/ajax-errors
...
Add a helper to converting ajax() call errors into a string with desc…
2017-07-10 09:32:40 -07:00
Łukasz Mierzwa
8e6b622d04
Add a helper to converting ajax() call errors into a string with description
...
There are many ways an ajax() call can fail but it's mostly the same pattern, capture it as a helper function and use for all calls
2017-07-10 09:30:03 -07:00
Łukasz Mierzwa
35480fca13
Merge pull request #137 from cloudflare/silence-speedup
...
Don't iterate a dict, just grab the key
2017-07-10 09:20:21 -07:00
Łukasz Mierzwa
fb75e6b083
Don't iterate a dict, just grab the key
...
This is slow, it's a dict, not need to iterate that.
2017-07-10 09:14:50 -07:00
Łukasz Mierzwa
51c2ed7f10
Merge pull request #139 from cloudflare/metrics-collector
...
Re-implement metrics calculation as a collector
2017-07-10 09:14:05 -07:00
Łukasz Mierzwa
9b5155e68c
Re-implement metrics calculation as a collector
...
Split metrics code into a collector, this way it's self contained and doesn't require mixing metric calculation in the main logic.
Fixes #130
2017-07-10 09:09:43 -07:00
Łukasz Mierzwa
6c74a7b7e9
Merge pull request #140 from cloudflare/min-ttls
...
We'll get a panic if user sets zero or negative TTL value, add a check
2017-07-10 09:09:15 -07:00
Łukasz Mierzwa
32a1145150
We'll get a panic if user sets zero or negative TTL value, add a check
2017-07-10 09:05:47 -07:00
Łukasz Mierzwa
644e439c5d
Merge pull request #135 from cloudflare/silence-preview-uri
...
Fix silence payload preview
2017-07-10 09:05:11 -07:00
Łukasz Mierzwa
fdec73cc64
Fix silence payload preview
...
Alertmanager URI doesn't have /api/v1/silences path, only the domain, add it.
2017-07-10 08:58:25 -07:00
Łukasz Mierzwa
233939524e
Merge pull request #134 from cloudflare/prettybench
...
Refactor Makefile targets to make it easier to add build tool deps
2017-07-10 08:57:14 -07:00
Łukasz Mierzwa
300c1ea2f9
Refactor Makefile targets to make it easier to add build tool deps
...
If I would add a new 'go get foo' line in the build/deps.ok target it wouldn't install anything since the file we touch at the end already exist. Split all 'go get foo' lines into dedicated targets and make build/deps.ok depend on it. This way when you add a new build time dependency make will be able to do the magic and just install what's missing.
I made those change to add github.com/cespare/prettybench, it ended up adding little value so I dropped it, but Makefile refactor still seems like a good idea
2017-07-10 08:54:19 -07:00
Łukasz Mierzwa
bd7b030424
Merge pull request #132 from cloudflare/refresh-fix
...
Refresh interval fixes
2017-07-10 08:51:32 -07:00
Łukasz Mierzwa
da063fbd83
Check for null values and set minimal refresh rate
2017-07-10 08:49:20 -07:00
Łukasz Mierzwa
60675fae19
Correctly update refresh interval if passed via query arg
2017-07-10 08:48:56 -07:00
Łukasz Mierzwa
dab23455b4
Merge pull request #133 from cloudflare/tab-reload
...
Move tab visibility code from grid.js to unsee.js
2017-07-10 08:47:48 -07:00
Łukasz Mierzwa
a21be4db4d
Move tab visibility code from grid.js to unsee.js
...
Instead of grid update run a full update, after keeping tab in the background for too long some alert groups are kept in the DOM where they should be purged. Chrome does some really complex background tab throttling, interwebz states that after >=10s in the background a tab can only use 1% of the cpu. Future code might need to use Web Workers API, assuming other vendors will use it too (https://arstechnica.com/information-technology/2017/03/chrome-57-background-tab-suspension-download/ ). For now let's just reload alerts when user switches to a previously background tab after more than a single refresh cycle, this will ensure that there's no dead alerts presents since that can be confusing
2017-07-07 19:49:02 -07:00
Łukasz Mierzwa
938177c3d9
Merge pull request #131 from cloudflare/fix-fingerprints
...
Fix fingerprints
2017-07-07 07:29:55 -07:00
Łukasz Mierzwa
5e0cb18075
Correctly seed alert fingerprints
...
Then need to be set after creating the alert
2017-07-06 22:28:14 -07:00
Łukasz Mierzwa
deaae332ec
Add strict API response test to catch any drift
2017-07-06 22:27:13 -07:00
Łukasz Mierzwa
32553e1581
Merge pull request #127 from cloudflare/page-visibility-change
...
Redraw alert list of user switches to unsee tab
2017-07-06 09:17:43 -07:00
Łukasz Mierzwa
ad47afd47d
Redraw alert list of user switches to unsee tab
...
This should limit UI artifacts when you keep unsee tab inactive (not fucused) for a long time and a browser stops refreshing content
2017-07-06 09:13:01 -07:00
Łukasz Mierzwa
215ece79cb
Merge pull request #128 from cloudflare/fix-metrics
...
Tweak collected metrics
2017-07-06 08:57:17 -07:00
Łukasz Mierzwa
6166fdd474
Expose number of time unsee collected alerts from Alertmanager API
...
This way one can alert if unsee stops collecting alerts.
2017-07-06 08:52:13 -07:00
Łukasz Mierzwa
cd63ee512e
Fix metric updates for alert counters
...
Metrics were incremented but never reset, this fixes it
2017-07-06 08:52:13 -07:00
Łukasz Mierzwa
4fe7835aa3
Merge pull request #129 from cloudflare/speedup-fingerprints
...
Speed up alert fingerprint generation
2017-07-06 08:48:10 -07:00
Łukasz Mierzwa
81ce5d3098
Speed up alert fingerprint generation
...
Dynamic fingerprints made the code much slower, pprof shows they are responsible for ~70% of all cpu usage for any API call. To make it worse they are applied to all alerts, since dedup layer doesn't know which alerts will be filtered later, it operates on all of them. This PR will:
1. add benchmarks to so it's easier to track performance
2. Keep current methods for accessing fingerprints, but use precomputed static fields in those
3. Refactor Alert methods to use pointers, so we're not working on a copy
Benchmark timing went down from ~4000ns to 0.4ns for fingerprint calls and API response times from 1.3s (for my test sample) to 0.2s, which puts it back to the same level as before moving fingerprints to be dynamic. I still don't like this code much, it's all over the place, but I don't have a good idea how to better structure this, let's hope I'll be wiser in the future.
2017-07-05 23:35:00 -07:00
Łukasz Mierzwa
fc04dde5ff
Merge pull request #126 from cloudflare/group-link-icon
...
Use share icon instead of link for alert group links
2017-07-05 09:12:30 -07:00
Łukasz Mierzwa
538249beb0
Use share icon instead of link for alert group links
2017-07-02 12:33:03 -07:00
Łukasz Mierzwa
3884b40667
Merge pull request #125 from cloudflare/vendor-updates
...
Vendor package updates
2017-07-02 11:45:37 -07:00
Łukasz Mierzwa
d64e2505c0
Update vendor packages
2017-07-02 10:19:02 -07:00
Łukasz Mierzwa
71c0dce1f6
Vendor renamed Sirupsen/logrus to sirupsen/logrus, fix imports
2017-07-02 10:12:33 -07:00
Łukasz Mierzwa
7c518c9dfa
Merge pull request #124 from cloudflare/multi-upstream
...
Collect alerts from multiple Alertmanager instances
2017-07-02 09:48:54 -07:00
Łukasz Mierzwa
aee5ec1a2e
Update screenshot using two alertmanager instances
2017-07-01 20:30:24 -07:00
Łukasz Mierzwa
0a06d58e22
Append alert state from the correct object
2017-07-01 20:28:51 -07:00
Łukasz Mierzwa
cb69029c4f
Add @alertmanager filter
2017-07-01 14:02:03 -07:00
Łukasz Mierzwa
812eceed39
Drop label keys from state and receiver button, those are static and we don't need to show them all the time
2017-07-01 13:34:05 -07:00
Łukasz Mierzwa
6f1e58d387
Don't flush cache on failed instances
...
Cache handling is done in the upstream handling code, this isn't needed anymore
2017-07-01 12:54:30 -07:00
Łukasz Mierzwa
4330972277
Color source buttons based on alert state in each
2017-07-01 12:53:51 -07:00
Łukasz Mierzwa
4036137984
Always render silences, if there are any
...
Alert can be silenced in one instance while active in another, always show silences so it's visible
2017-07-01 12:46:19 -07:00
Łukasz Mierzwa
f2b21a60e2
Store alert state per instance
2017-07-01 12:43:15 -07:00
Łukasz Mierzwa
8ef0f3881e
Tweak error message for all Alertmanager instances being down
2017-07-01 12:42:43 -07:00
Łukasz Mierzwa
01c89082dd
Calculate min/max timestamps and store those as globals, keep individual timestamps per instance
2017-07-01 12:09:55 -07:00
Łukasz Mierzwa
5bd03234a0
Clear Alertmanager data on pull error
2017-07-01 11:31:29 -07:00