Commit Graph

497 Commits

Author SHA1 Message Date
Alfonso Acosta
43f4da0ecc Fix tests 2016-10-18 17:26:45 +00:00
Alfonso Acosta
bd3ececb11 Increase timestamp precision 2016-10-18 15:24:37 +00:00
Paul Bellamy
002770d394 use hashicorp/clean-http to get better http client defaults 2016-10-13 09:45:27 +01:00
Paul Bellamy
28213a00a4 Add timeouts to the probe http client 2016-10-12 17:20:47 +01:00
Tom Wilkie
2a00fd2d78 Allow user to specify URLs on the command line, and use that to allow per-target tokens. (#1901)
Also:
- Parse targets on startup and catch badly formed ones before Scope can start.
- If no port is specified, use default port for scheme; if no scheme is specificed, use 4040.
- Use username as probe token
2016-10-05 10:59:56 -07:00
Simon Howe
0774496102 Remove ContainerImage.imageID in the details panel
It will be re-introduced later as imageIDs
2016-09-28 16:17:14 +02:00
Alfonso Acosta
6ed79a7427 Merge pull request #1897 from weaveworks/stricter-dns-over-tcp-snooping
Be more strict when snooping DNS over TCP traffic
2016-09-27 21:12:35 +02:00
Alfonso Acosta
45a9367d97 Be more strict when snooping DNS over TCP traffic 2016-09-27 12:48:25 +00:00
Tom Wilkie
b130f1ba13 Allow users to specify conntrack buffer size. (#1896)
* Allow users to specify conntrack buffer size.

* Fix tests.

* Use a config struct.
2016-09-26 12:08:38 -07:00
Alfonso Acosta
326208c395 Skip DNS length field (only included over TCP) 2016-09-23 13:57:39 +00:00
Alfonso Acosta
6f95d05c59 Add support for snooping DNS over TCP 2016-09-23 12:41:32 +00:00
Alfonso Acosta
c5ac315b38 Review feedback 2016-09-20 16:50:29 +00:00
Alfonso Acosta
f5ad6a8e97 Minor fixes/refinements 2016-09-19 14:38:59 +00:00
Alfonso Acosta
028ed32b6f Simplify service node matching 2016-09-19 14:38:59 +00:00
Alfonso Acosta
0223b0b385 Implement DNS snooper 2016-09-19 14:38:59 +00:00
Matthias Radestock
9d010fabc8 refactor: extract makeEndpointNode helper 2016-09-02 21:12:23 +01:00
Matthias Radestock
5bc3a9d5ac correctly reverse-resolve source of inbound connections
There were two problems:
- the renderer was looking for reverse names on the destination
- the probe was not annotating source nodes with reverse-resolved names

Fixes #1847
2016-09-02 20:31:03 +01:00
Matthias Radestock
3ebe4a5303 cosmetic: formatting 2016-09-02 08:19:32 +01:00
Alfonso Acosta
7702905bbf Remove unused variable 2016-08-26 14:03:29 +00:00
Alfonso Acosta
a904620908 Improve conntrack kernel-support detection for in-kernel compilations 2016-08-26 14:03:29 +00:00
Matthias Radestock
fa784140a4 appease linter 2016-08-26 14:50:45 +01: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
Alfonso Acosta
7c2e3c87d3 Merge pull request #1832 from weaveworks/1824-wrong-pod-parents
Only consider pod parents living in the same namespace
2016-08-26 11:37:28 +01:00
Matthias Radestock
af48c7f240 Merge pull request #1830 from weaveworks/1664-correct-cpu-metrics
correct cpu metrics

Fixes #1664.
2016-08-26 11:18:56 +01:00
Alfonso Acosta
8a7812eab9 Only consider pod parents living in the same namespace 2016-08-25 16:05:01 +00:00
Matthias Radestock
e2a80cfa14 correct host cpu metric
The host CPU metric was reported as a percentage of all available CPUs,
but the limit was set to n_cpus * 100%. So on a 4-core machine the
graphs and metrics-on-canvas would never show more than 1/4th usage. Now
the limit is set to 100%.

Fixes #1664.
2016-08-25 16:14:42 +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
b7b64a7975 Use login shells in terminals 2016-08-22 17:42:38 +00:00
Alfonso Acosta
4cb002e360 Merge pull request #1817 from weaveworks/release-0.17
Release 0.17.1
2016-08-19 15:04:36 +01:00
Alfonso Acosta
8c6747f560 Fix spelling mistake 2016-08-18 16:58:11 +00:00
Alfonso Acosta
9839b3d161 Log the API server host 2016-08-18 15:33:06 +00:00
Alfonso Acosta
1bdff95f33 Extend kubernetes client flags to match kubectl 2016-08-17 15:16:58 +00: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
Paul Bellamy
6e2fe78cab Merge pull request #1682 from kinvolk/krnowak/plugin-controls
RFC: forwarding control requests to plugins
2016-08-16 13:44:42 +01:00
Simon
6f9912501d Merge pull request #1784 from weaveworks/1745-right-align-column-numbers
Right align numbers, left align strings.
2016-08-15 09:43:31 +02:00
Krzesimir Nowak
0ecb908c22 Ensure backward compatilibity in report's node controls
The new probe will convert all node's LatestControls to Controls, so
the old app can consume them. Also, the new app will convert all
node's Controls to LatestControl, so it can consume the reports from
old probes.
2016-08-12 17:15:43 +02: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
Krzesimir Nowak
7f46b90e27 Make LatestMap "generic"
This commit makes the LatestMap type a sort of a base class, that
should not be used directly. This also adds a generator for LatestMap
"concrete" types with a specific data type in the LatestEntry.
2016-08-12 17:03:42 +02:00
Krzesimir Nowak
0116b963e3 Extend the node control rewriting test
Just to make sure that all the node controls are rewritten, even those
that don't have a counterpart in topology controls.
2016-08-12 17:03:42 +02:00
Krzesimir Nowak
1f5dbb776f Add shortcut reports for plugins.
Plugins are queried for reports two times in a second. That's often
enough to get the shortcut reports. The reports are sent together with
the response.
2016-08-12 17:03:42 +02:00
Krzesimir Nowak
cecf70ecd5 Marshal structs in the plugins registry tests
This is better than writing JSON strings by hand, which is
error-prone.
2016-08-12 17:03:42 +02:00
Krzesimir Nowak
0e06423a37 Forward control requests to plugins
Thanks to that, plugins can react to requests from controls they
exposed.

To make it work, plugins registry modifies each plugin's report by
prepending the plugin ID to the control name the plugin has exposed
before sending it to the app. Then the registry installs the control
request handler for this faked control name, which forwards the
request to the correct plugin.

This adds a new API endpoint to plugins next to "/report" - a
"/control" entry. The body of the request is the JSON-encoded
xfer.Request instance.
2016-08-12 17:03:42 +02:00
Krzesimir Nowak
41193b428e Make control handlers registry an object and extend its functionality
It is not a singleton anymore. Instead it is an object with a registry
backend. The default registry backend is provided, which is equivalent
to what used to be before. Custom backend can be provided for testing
purposes.

The registry also supports batch operations to remove and add handlers
as an atomic step.
2016-08-12 17:03:42 +02:00
Krzesimir Nowak
c6b5d98699 Test the case when a plugin reports more than one plugin 2016-08-12 17:03:42 +02:00
Krzesimir Nowak
993eebeea9 Remove impossible case of an empty plugin ID
Plugin ID must be non-empty when the plugin is created and the
followup reports cannot change it.
2016-08-12 17:03:42 +02:00
Krzesimir Nowak
9d48fdc32c Restrict the set of allowed characters in plugin IDs
We will want to put plugin id in a control id, which is sent to an app
and then to GUI. When we get a control request from GUI, we will want
to extract the plugin ID from the control name. To do it unambiguously
we need some separator made of chars that are not allowed in a plugin
name. This is to avoid the situation when there are two plugins:
"Plugin" and "PluginFoo". "Plugin" exposes a control named
"FooControl" and "PluginFoo" exposes a control named "Control". Faking
the control names which will be sent to the app would result in two
"PluginFooControl".

One possible option for plugin ID and control name separator would be
"/", but that won't work, since the request sent from GUI to the app
to <probe>/<node>/<control> would actually be
<probe>/<node>/<plugin>/<control> and as such wouldn't match the URL
template in RegisterControlRoutes().
2016-08-12 17:03:42 +02:00
Krzesimir Nowak
ccd26fe69d Ban the possibility of changing plugin's ID
Changing plugin's ID only complicates control handling in plugins so
let's ban it.
2016-08-12 17:03:42 +02:00
Simon Howe
3851d9c662 Right align numbers, left align strings.
ala excel/spreadsheets etc.
2016-08-12 15:18:39 +02:00