556 Commits

Author SHA1 Message Date
Mike Lang
873e6a68c7 Merge pull request #2362 from weaveworks/mike/k8s-ns-in-container-view
When k8s present, allow filtering of containers by namespace (take 2)
2017-03-23 12:12:14 -07:00
Paul Bellamy
9228f7a7fa Container Seconds should not be Container Nanoseconds (#2372) 2017-03-22 17:34:46 +00:00
Paul Bellamy
e68ffd467e Add app/multitenant/billing_emitter to emit billing events 2017-03-22 10:41:34 +00:00
Mike Lang
c06e7582cb api_topologies k8s filters: some minor refactoring for niceness 2017-03-21 15:43:30 -07:00
Mike Lang
b61d7027af Fix various sources of mutation instead of copying in k8s filter merging code
This was causing a large number of repeated appending of the same option group
2017-03-20 15:05:12 -07:00
Mike Lang
da8b8d5095 Revert "Revert "Merge pull request #2285 from weaveworks/mike/k8s-ns-in-container-view""
This reverts commit d55c528fe2.
2017-03-20 10:05:10 -07:00
Mike Lang
d55c528fe2 Revert "Merge pull request #2285 from weaveworks/mike/k8s-ns-in-container-view"
This reverts commit 76ddc75fb8, reversing
changes made to 3ade2933eb.

We are rolling this back for now because it's causing a bug where sub-topologies
would have ~3000 repeated cases of the k8s filters, causing performance issues clientside.
2017-03-17 14:00:05 -07:00
Adam Harrison
83c073fad0 Correct dynamoDB metric label
Discovered whilst attempting to resolve github.com/weaveworks/service/issues/1157
2017-03-17 12:09:40 +00:00
Mike Lang
76ddc75fb8 Merge pull request #2285 from weaveworks/mike/k8s-ns-in-container-view
When k8s present, allow filtering of containers by namespace
2017-03-16 14:56:10 -07:00
Mike Lang
b01e890475 When k8s present, allow filtering of containers by namespace
To facilitate this, we replace the existing functionality of updateFilters which
sets k8s topologies to have the filters [namespace, managed], to instead append the namespace filter
to any existing. This lets it apply to both k8s and container topologies without overwriting existing
container filters. We instead set the managed filter in the static definition.

This however has the side effect that the ordering of the namespace filter and the managed filter
in k8s topologies has been reversed, so it reads:
	Show Unmanaged | Hide Unmanaged
	foo | bar | default | baz | All Namespaces
instead of:
	foo | bar | default | baz | All Namespaces
	Show Unmanaged | Hide Unmanaged
2017-03-16 14:21:11 -07:00
Bryan Boreham
b085c80ef3 Decode via byte slice for memcache and file read
This is more efficient, since the decoder can read field names in-place.
It also appears to be absolutely faster.
2017-03-14 14:54:17 +00:00
Matthias Radestock
56892addfc quantise reports
Merge all reports received within a specified interval, discarding the
originals. This improves performance of Report() on repeated
invocation since it ends up merging fewer reports.

For example, if reports are received every second (e.g. 3 probes
reporting at the default probe.publishInterval of 3s), and the
app.windows is 15s (the default) and the report generation interval is
5s (e.g. one UI accessing every TOPOLOGY_INTERVAL; the default), then
the original code would have to merge 15 reports per UI access,
whereas this code will only need to merge 8 to 9 reports (3-4 merged
reports from previous invocation plus 5 recently received reports).
2017-03-06 10:33:03 +00:00
Matthias Radestock
289b4c63af report playback
Now you can launch the scope app with something like

./prog/scope --mode=app --weave=false --app.collector=file:///tmp/reports

and if the specified dir contains reports with filenames in the form
<timestamp>.{msgpack|json}[.gz],
e.g. "1488557088545489008.msgpack.gz", then these reports are replayed
in a loop at a sequence and speed determined by the timestamps.
2017-03-04 22:04:50 +00:00
Filip Barl
2e9255b190 Addressed the comments and fixed the tests. 2017-02-20 11:40:40 +01:00
jpellizzari
39114a8ddb Changed container-label-filters-group url param to system 2017-01-23 15:54:49 -08:00
jpellizzari
08010bcff6 Change topologies option from 'notsystem' to 'application' 2017-01-20 13:30:10 -08:00
Jonathan Lange
1020fc5f85 Use test.Diff from common 2016-12-07 11:22:40 +00:00
Jonathan Lange
e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Alfonso Acosta
b4d5665fd8 Merge pull request #2021 from kinvolk/alban/linter
linter: fix punctuation and capitalization
2016-12-05 15:45:01 +01:00
Alfonso Acosta
9c7282231f Fix tests
Also, refactor some tests and MakeRegistry in api_topologies
2016-11-29 07:18:08 -08:00
Alfonso Acosta
747577f414 Review feedback 2016-11-29 07:18:08 -08:00
Mike Lang
d20381d30b merger: Pass reports via closure, instead of by reference in args
This is an alternate way of solving the same problem as 4007a902a264e5ff2c3be6b269ade515c9c1c145,
but in a nicer way. Compared to using pointers, this approach more obviously preserves the original
behaviour, and is arguably more readable than the original code.

Credit to @rade for this approach.
2016-11-29 07:18:08 -08:00
Mike Lang
8f2e3e7d9b merger: Fix a pointer bug that trashed the merge process
Turns out that when iterating in go, &loop_var is the same address every time
2016-11-29 07:18:08 -08:00
Alfonso Acosta
f8b1f71f06 Finish rendering for ECS topologies 2016-11-29 07:18:08 -08:00
Alfonso Acosta
78775bbdb8 Initial rendering for ECS
(not working yet)
2016-11-29 07:18:05 -08:00
Mike Lang
7d93e2cfe7 merger: Pass pointers, not structs
just in one function, where two of them are passed at once.
This was causing errors because it was too large to fit the stack.
2016-11-29 07:17:16 -08:00
Alfonso Acosta
bf4747f132 Hide Weave topology if empty
Also, make name consistent with other subtopologies
2016-11-28 16:34:02 +00:00
Alban Crequy
3c40892add linter: fix punctuation and capitalization
Symptoms:
> app/control_router.go:44:38: error strings should not be capitalized or end with punctuation or a newline

This is blocking the build on:
https://circleci.com/gh/kinvolk/scope/363
2016-11-23 17:17:14 +01:00
Tom Wilkie
21ee72a384 Add OpenTracing support to TimeRequestHistogram (#2023)
* Vendor open tracing

* Extend TimeRequestHistorgram to also emit opentracing spans.

* Update some of the labels
2016-11-22 14:43:15 +00:00
CarltonSemple
a5859ba218 Addressed final comments 2016-11-15 22:18:55 +00:00
CarltonSemple
9833a854b1 Added container filters as CLI arguments
gofmt load_container_filters.go

removed the environment variable for container label filters

Added the --app.container-label-filter command line argument, and load_container_filters.go now uses the results from that

Changed init() to InitializeTopologies()

Changed init() to InitializeTopologies() so that it can be called after the container filters are loaded from the command line argument. init() executes before main() in prog/main.go, so the flag parsing isn't finished before init() is called

Applied lint fixes

fixed lint issues

brought back the init function for api_topologies.go

Addressed many of the PR comments, except escaping colons

Renamed IsDesired to HasLabel in render/filters.go

Allows for the user to escape colons

added registry function for modifying the container filters

created a separate function that parses the container filter flags

simplified registry.addContainerFilters()

addressed review comments

switched API Topology Description IDs to constants

addressed review comments

joined constants

added test functions

addressed most of the review comments

Changed containerLabelFilters to an array of APItopologyOptions, placing the parsing in the Set() function. Removed parsing from HasLabel in render/filters.go

refactored code

added test that applies to the container filtering by labels

applied golint

made Registry items private and added a MakeRegistry() function

fixed usage of topologyRegistry.RendererForTopology

Added container label filters by exclusion

minor update to report_fixture

Modified container labels test to use existing report

I added labels to the existing containers in the fixed report for testing.

refactored code

refactored code

further code refactoring

addressed @ijsnellf's review comments

unexported Registry, and reduced duplicate code

addressed @ijsnellf's review comments

Addressed review comments

Addressed final review comments
2016-11-15 19:13:35 +00:00
Matthias Radestock
0610936296 plug goroutine leak in control
Fixes #2002.
2016-11-10 17:45:16 +00:00
Alfonso Acosta
37ba071feb Allow passing arguments to controls 2016-10-31 11:04:40 +01:00
Alfonso Acosta
403b70dde8 Disable pipes endpoint, we are going for controls instead 2016-10-31 11:04:40 +01:00
Alfonso Acosta
c2f2a90b61 Implement App endpoint /pipe/{id}/resize_tty/{height}/{width} to resize ttys 2016-10-31 11:04:39 +01:00
Alfonso Acosta
b458c4c0c8 Merge pull request #1182 from weaveworks/1132-weave-topology
Add the basics for a Weave-specific topology.
2016-10-28 12:23:55 +02:00
Alfonso Acosta
b6b343cbfd Review feedback 2016-10-28 08:58:45 +00:00
Alfonso Acosta
7771625a25 Change topology title to Weave Net 2016-10-26 08:28:45 +00:00
Alfonso Acosta
3023f4be80 Add Weave summary generator and fix Weave renderer 2016-10-26 07:40:14 +00:00
Alfonso Acosta
8e4dfd7987 Add Weave peers view 2016-10-24 15:33:30 +00:00
Alfonso Acosta
9881a6b631 Fix tests 2016-10-24 09:41:53 +00:00
Alfonso Acosta
8c70630a74 Merge pull request #1921 from kinvolk/lint-ctx-key
Fix linter error for string in context.WithValue
2016-10-20 11:32:44 +02:00
Alfonso Acosta
3829784967 Merge pull request #1904 from weaveworks/1864-apply-filters-to-details-panel
Apply filters from current view to details panel
2016-10-18 15:10:29 +02:00
Lorenzo Manacorda
2a682dd7b0 Fix linter error for strings in context.WithValue 2016-10-13 14:28:30 +02: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
Alfonso Acosta
3250b7289e Do not apply filters if no filtering options are provided 2016-10-05 14:04:53 +00:00
Alfonso Acosta
5eabf5436c Make linter happy 2016-10-05 13:07:17 +00:00
Alfonso Acosta
3f27d5f6cc Do not filter out the target nodes when obtaining the details panel 2016-10-05 12:22:50 +00:00
Alfonso Acosta
bbb2c10975 Apply filters to details panel 2016-10-05 08:51:26 +00:00
Matthias Radestock
902ba88479 make smartMerger.Merge merge reports in parallel
for reduced latency
2016-08-24 08:02:23 +01:00