56 Commits

Author SHA1 Message Date
Tom Wilkie
3173f6ad75 Use histograms over summaries 2016-07-12 11:15:57 +01:00
Paul Bellamy
7736564337 refactor some timing helpers into a common lib 2016-07-05 12:29:00 +01:00
Julius Volz
4fa40e22b2 Rework Scope metrics according to Prometheus conventions. (#1615)
* Rework Scope metrics according to Prometheus conventions.

- counters should end with _total
- elaborated and added units to help strings
- recommended for cache hit/miss metrics: track only the total and the
  hits and in separate metrics, since the most common query will be
  "hits / total"
- track all times in seconds (base units), which has become the standard
  recommendation
- other small changes

There could be more changes that would require more thinking (what
dimensions to use, summaries vs. histograms, etc.), but this is probably
enough controversial material already :)

* Use timeRequestStatus() in sqs_control_router.go.
2016-06-30 09:12:25 +01:00
Tom Wilkie
ab3d34be01 Make it easier to disable weave integrations (#1610)
* Make it easier to disable weave integrations

* Review feedback

* Make test pass
2016-06-27 16:11:57 +01:00
Jonathan Lange
39c9de8e2a Get route name before munging request
This ought to correct a problem where we incorrectly report route names
for admin routes
2016-06-15 16:06:19 +01:00
Alfonso Acosta
80f72638ce Add Indentity middleware 2016-06-09 14:30:53 +00:00
Tom Wilkie
982189161b If we don't get a path name from the router, make one up from the url. (#1570)
* If we don't get a path name from the router, make one up from the url.

* Think about route naming a little more and add a comment to show it.
2016-06-09 12:48:22 +01:00
Alfonso Acosta
bbf55922d0 Merge pull request #1564 from weaveworks/probe-version-header
Add probe version header to probe requests
2016-06-08 15:34:34 +01:00
Alfonso Acosta
a6f8b0a0c6 Add probe version header to probe requests 2016-06-08 13:49:21 +00:00
Alfonso Acosta
116943f184 Rewrite net/http.Request.{URL.Path,RequestURI} consistently 2016-06-08 08:50:06 +00:00
Tom Wilkie
8d092c37e7 Also rewrite r.URL.Path, as gorilla mux reads this. 2016-05-23 16:18:24 +01:00
Tom Wilkie
3335361ae9 Include label in prom metric to distinguish ws connection latencies. 2016-05-23 15:02:41 +01:00
Tom Wilkie
5079a9eba4 Only log first http header. 2016-05-23 14:02:52 +01:00
Tom Wilkie
7631116ff5 Add explicity PathReplace middleware (#1393) 2016-04-28 12:28:44 +01:00
Tom Wilkie
e81b1b98e9 Add generic path rewrite middleware
And fix a bug in the logging middleware.
2016-04-26 14:43:48 +01:00
Paul Bellamy
1539e668e7 Merge pull request #1290 from weaveworks/remove-container-control
Add control for removing stopped docker containers.
2016-04-22 14:13:40 +01:00
Tom Wilkie
901f46c5fc Report if newer version are availible in /api (#1366)
* Report if newer version are availible in /api

* Render version update hint in UI, next to version

* Fix lint
2016-04-22 10:25:00 +01:00
David Kaltschmidt
62ed88cf16 Close details panel when node was removed via control 2016-04-21 18:34:51 +02:00
Tom Wilkie
ed555b6780 Add 'closeDetails' field to control responses. 2016-04-21 16:40:21 +01:00
Paul Bellamy
7090855f9e Add local_networks to weave Overlay nodes, so we can track weave without an exposed weave ip (#1313) 2016-04-15 16:23:15 +01:00
Paul Bellamy
16c497d30a ditch plugin handshake endpoint 2016-04-12 17:22:39 +01:00
Paul Bellamy
333d32fbe5 Review Feedback 2016-04-12 17:22:38 +01:00
Paul Bellamy
fcfd42e5d5 Review feedback - adding plugin status field 2016-04-12 17:22:38 +01:00
Paul Bellamy
7632e0b3c5 Adding support for plugins, with basic example of iowait, and ebpf
Squash of:
* Include plugins in the report
* show plugin list in the UI
* moving metric and metadata templates into the probe reports
* update js for prime -> priority
* added retry to plugin handshake
* added iowait plugin
* review feedback
* plugin documentation
2016-04-12 17:22:14 +01:00
Tom Wilkie
da53aac25d Tests & vartious fixes for consul pipe router.
Fix a few bugs in the consul pipe router:
- Don't share a pointer
- Write nil to pipe when closing a bridge connection to ensure the connection shutdown.
- Ensure we shutdown bridge connections correctly
2016-04-12 14:28:10 +01:00
Tom Wilkie
734a01d603 Review feedback, lint & fix tests. 2016-04-06 15:59:02 +01:00
Tom Wilkie
727553962b Insturment the app with prometheus. 2016-04-06 14:58:28 +01:00
Tom Wilkie
a8f0d64b3c Add middleware for logging each request to the app. 2016-04-06 14:47:08 +01:00
Alfonso Acosta
c1c40ad20d Add host-level terminals 2016-03-29 16:05:04 +00:00
Tom Wilkie
ac638d17dd Review feedback 2016-03-23 15:41:37 +00:00
Tom Wilkie
9885706402 Multi-tenant backends for app.
Add DynamoDB based collector
    - Store compressed reports in dynamodb

    Add SQS based control router.
    - Uses a queue per probe and a queue per UI for control requests & responses.

    Add Consul-based, horizontally-scalable, multi-tenant pipe router.
    - Uses consul to coordinate each end of pipe connections replicas of a pipe service.
2016-03-23 15:41:37 +00:00
Tom Wilkie
581b711eb4 Websocket and pipe fixes. 2016-03-15 17:13:49 +00:00
Tom Wilkie
da33d9c106 Have the probe fill in the app id, not the app 2016-03-03 09:26:23 +00:00
Paul Bellamy
35fe8864a1 Review Feedback 2016-02-25 16:34:35 +00:00
Paul Bellamy
cfc071471b Add ping/pong to websocket protocol 2016-02-24 17:16:35 +00:00
Paul Bellamy
f794bbff3d log errors on control and pipe websockets as well (now that we can) 2016-02-24 16:25:05 +00:00
Paul Bellamy
e865890d72 Don't log "expected" websocket errors, like the socket being closed 2016-02-24 16:25:05 +00:00
Alfonso Acosta
f96e7dffa9 Use Sirupsen/logrus logger in the Weave tagger 2016-02-17 16:25:17 +00:00
Alfonso Acosta
0d917b2d8b Use github.com/ugorji/go/codec/ for wiring messages
* New encoding format:
  * Msgpack reports between probe<->app (smaller representation, faster to
    encode/decode).
  * Still use JSON between app<->UI (try to avoid making javascript deal with
    mspack).

  The app still suports publishing reports in both gob and JSON, not braking
  backwards compatibility.

* Use compile-time generated marshallers/unmarshallers for higher performance. In
  order to be able to skip code-generation for certain types, I included
  https://github.com/2opremio/go-1/tree/master/codec/codecgen instead of
  upstream until https://github.com/ugorji/go/pull/139 is merged.

* Encode/decode intermediate types using github.com/ugorji/go/codec.Selfer
  for higher performance and reducing garbage collection (no temporary buffers).
2016-02-16 06:31:31 +00:00
Tom Wilkie
d4e58b9e33 Decouple Scope lifecycle from Weave lifecycle
- Run the Weave integrations regardless of if weave is detected.
- Make everything backoff and not spam the logs.
- Add miekg dns to vendor.
- Have the app periodically register with weaveDNS, and the probe do lookups there.
- Decide what the local networks are at runtime, not once at startup.
- Correctly resolve app ids, fixes #825
2016-02-09 14:24:57 +00:00
Alfonso Acosta
3d94082b07 Add debug logging 2016-02-05 16:58:40 +00:00
Alfonso Acosta
e78a64fa15 Fix compilation in darwin 2016-02-02 21:40:27 +00:00
Alfonso Acosta
f1ac5f102f Fix net namespace reading in pre-3.8 kernels 2016-02-02 17:53:24 +00:00
Tom Wilkie
ffa955a21b Split and move xfer package. 2016-01-06 14:01:39 +00:00
Alfonso Acosta
840fcb2441 [probe] Make sanitize.URL work with wss 2015-12-21 17:00:23 +00:00
Tom Wilkie
1fcd079563 Use Readdirnames to reduce number of stats we're doing. 2015-12-10 14:43:40 +00:00
Tom Wilkie
cc5935a89d Review feedback 2015-12-10 14:10:36 +00:00
Tom Wilkie
ed6c4088fa Fix up tests. 2015-12-10 14:00:43 +00:00
Tom Wilkie
5cadafcda4 Extend testing of procspy. 2015-12-09 14:47:00 +00:00
Tom Wilkie
4444a405e0 Fix comment 2015-12-04 15:33:12 +01:00