Commit Graph

81 Commits

Author SHA1 Message Date
Alfonso Acosta
8bf753a51b Revert "Revert "Add options to hide args and env vars (#2306)"" (#2311)
* Revert "Revert "Add options to hide args and env vars (#2306)""

* Make linter happy
2017-03-08 02:16:42 -08:00
Alfonso Acosta
dcc7389127 Revert "Add options to hide args and env vars (#2306)"
This reverts commit 764afb6301.
2017-03-07 17:51:27 +01:00
Mike Bryant
764afb6301 Add options to hide args and env vars (#2306)
* Add options to hide args and env vars

To allow for use of weave-scope in an unauthenticated environment,
add options to the probe to hide comand line arguments and
environment variables, which might contain secret data.

Fixes #2222

* Change docker.NewRegistry arguments to be a struct

* Remove redundant declarations of default values

* Move registry options outside to improve readability
2017-03-07 08:51:18 -08:00
Filip Barl
d3466b5454 Refactored the table component/model and wrote the tests
Backward-compatibility fix
2017-01-16 17:05:36 +01:00
Filip Barl
31be525bd2 Created generic table model on backend
Replaced MetadataRow with generic Row in Table model

Sending through multicolumn tables from the backend
2017-01-16 12:22:10 +01:00
Jonathan Lange
e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Alfonso Acosta
9367d95cb0 Allow providing fixed entries in tables 2016-11-02 13:00:15 +00:00
Alfonso Acosta
bd3ececb11 Increase timestamp precision 2016-10-18 15:24:37 +00:00
Matthias Radestock
a5b491dd46 Merge pull request #1833 from weaveworks/simplify-container-stats
use go-dockerclient's Client.Stats

Fixes #1799
2016-08-26 13:07:16 +01:00
Matthias Radestock
3c4833fe97 use go-dockerclient's Client.Stats
...instead of rolling our own.

This also fixes #1799 - a race condition that could result in multiple
stats gatherers for a container.
2016-08-26 12:43:30 +01:00
Matthias Radestock
b209d22e08 normalise container CPU metrics to 100%
The container CPU metric was reported in units of 100% = 1 CPU. So the
the ratio was correct, but since we don't show limits in most places it
is hard to interpret that figure. It also makes sorting by CPU usage
highly misleading. So now we normalise everything to 100%. That too can
be misleading, depending on what you are looking for, but it's generally
less surprising.
2016-08-25 16:13:36 +01:00
Alfonso Acosta
b3b160ceb0 Merge pull request #1791 from weaveworks/release-0.17
Release 0.17.0
2016-08-16 15:04:29 +01:00
Alfonso Acosta
8b97f12ab1 Make stats gathering idempotent 2016-08-16 12:50:22 +00:00
Krzesimir Nowak
9e092f1a4a Switch to LatestMap-style node controls
This allows plugins to add controls to nodes that already have some
controls set by other plugin. Previously only the last plugin that
sets the controls in the node would have its controls visible. That
was because of NodeControls' Merge function that actually weren't
merging data from two inputs, but rather returning data that was newer
and discarding the older one.
2016-08-12 17:15:43 +02:00
Alfonso Acosta
8a950a59d6 Remove Metric Add() method
* Helps reduce garbage (MakeMetric() now takes a slice and there's a shorter version MakeSingletonMetric())
* Fixes bug computing Max (Min) in samples since using MakeMetric()
  was causing a default Max/Min of zero.
* Simplifies code a bit
2016-08-01 16:58:11 +00:00
Matthias Radestock
b3874e6e6f show names of stopped containers
This got broken in b78c503

Fixes #1691
2016-07-21 11:01:53 +01:00
Matthias Radestock
34cb6d5a84 reduce container stats log noise
Don't complain about net.errClosing, which we typically get instead of
io.EOF when the container stops.
2016-07-16 20:33:15 +01:00
Matthias Radestock
30a5a9e64b reduce container stats log noise
reduce log level
2016-07-16 20:32:36 +01:00
Matthias Radestock
b38913e5c9 tiny improvement: log container id in stats collection loop 2016-07-16 20:12:19 +01:00
Tom Wilkie
d888509865 Ignore IPv6 addresses in Docker reporter (#1552) 2016-06-15 16:05:12 +01:00
Alfonso Acosta
0fd2754b58 Gather IPs from all the container networks 2016-06-10 17:45:54 +00:00
Peter Bourgon
10ced2d09d First cut of network data 2016-06-06 16:24:02 +02:00
Alban Crequy
42ad3aa12b Scope slow: improve error messages for debugging (#1534)
* alpine: dl-4.alpinelinux.org is dead, use another server

* increase buffer for docker stats

Attempt to avoid the following message:
docker container: dropping stats.

* probe: better timeout error messages

The logs contains the following messages:

Process reporter took longer than 1s
K8s reporter took longer than 1s
Docker reporter took longer than 1s
Endpoint reporter took longer than 1s

This patch prints how long it takes.
2016-05-22 18:21:55 +01:00
Alfonso Acosta
b78c503004 Review feedback 2016-05-10 08:03:46 +00:00
Alfonso Acosta
e83f985ea6 Precompute base of the container nodes 2016-05-10 06:25:06 +00:00
Alfonso Acosta
4140d288a8 Don't scope docker IPs in Kubernetes 2016-05-04 14:50:22 +00:00
Tom Wilkie
02554b1dcd Propagate network info for containers sharing network namespaces (#1401)
- Add armon/go-radix library, use this to find containers by prefix
- Deal with host net namespace in the same way
2016-04-29 18:13:55 +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
65dbca997c Add control for removing stopped docker containers. 2016-04-21 16:24:41 +01:00
Tom Wilkie
cec750049f Immediately remove deleted containers from the UI. 2016-04-21 12:26:51 +01:00
Tom Wilkie
9eda27822c Show k8s labels and container env vars in the details panel. (#1342)
* Show k8s labels and container env vars in the details panel.

* Add show more bar to the env vars and labels

* React key was in the wrong place; empty tables render section labels.
2016-04-20 08:18:03 +01:00
Paul Bellamy
1edeb8d190 Removing report.Node.WithID (#1315)
* removing usage of report.Node.WithID

* report.Topology.AddNode can use the node's ID field
2016-04-19 16:48:03 +01:00
Ilya Dmitrichenko
a49c3893de More sensible container names for Mesos/Marathon (#1316)
* Collect container environment variales (close #1314)

* Containers managed by Marathon can have meaningful names (close #1309)

* Make linter happy and fix tests
2016-04-18 12:10:18 +01:00
Paul Bellamy
bfb65cb4af Merge pull request #1225 from weaveworks/1149-more-meaningful-metrics-max-mmmmmmm
Set the memory and open files maximums based on the host
2016-04-07 10:36:30 +01:00
Paul Bellamy
f3adefa454 Update docker client, to get better state strings in the UI 2016-04-06 16:39:45 +01:00
Paul Bellamy
b970b0561b Set the memory and open files maximums
process memory limit is not cgroup-aware
2016-04-06 13:07:55 +01:00
Paul Bellamy
1f6652e1c3 strip sha256: from docker image ids 2016-03-16 13:06:54 +00:00
Paul Bellamy
d2bf204181 Merge pull request #960 from weaveworks/no-ips-for-no-network
Don't show blank IPs metadata row for containers with no IP
2016-02-19 17:39:01 +00:00
Paul Bellamy
5535f5e738 Review Feedback 2016-02-19 17:04:00 +00:00
Alfonso Acosta
49f6568138 Place buffer infront of the docker stats decoder 2016-02-19 14:06:47 +00:00
Paul Bellamy
df856d78dc set container IPs to host IPs for containers with --net=host 2016-02-17 16:42:52 +00:00
Paul Bellamy
092342c0ff don't show blank ips metadata row for containers with no IP 2016-02-17 16:21:37 +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
Alfonso Acosta
3d94082b07 Add debug logging 2016-02-05 16:58:40 +00:00
Tom Wilkie
638c5676cb Add container uptime and restart count to details panel. 2016-01-29 14:31:40 -08:00
Tom Wilkie
68a3748f01 Don't allocate lots of docker.Stats structs, do some copying instead 2016-01-29 11:38:55 -08:00
Tom Wilkie
34447fd502 Close response body for docker stats calls. 2016-01-29 10:45:20 -08:00
Tom Wilkie
6b56475766 Use ps.Map for Counters and Sets, remove Metadata in favour of Latest.
Also
- Add more complicated report.json for benchmark
- Break up report/topology.go
- Implement our own DeepEqual for ps.Map
2016-01-22 15:10:32 -08:00
Paul Bellamy
bf57aeb8d9 Rename the various metric keys so they don't accidentally overlap 2016-01-20 16:14:32 +00:00
Paul Bellamy
e30c9dc264 use constants for the topology names in Parents/metadata/metrics 2016-01-19 16:47:48 +01:00