Commit Graph
199 Commits
Author SHA1 Message Date
Mike Lang 7d58e6a9c3 awsecs: Add dummy scale up and scale down controls for services
These controls do nothing for now, this was just to get the control buttons working
2017-02-07 14:57:31 -08:00
Mike LangandGitHub dee274e438 Merge pull request #2065 from weaveworks/mike/ecs/caching
ECS reporter: Minimize API calls by caching task and service data
2017-01-24 11:03:51 -08:00
Iago López Galeiras f0d9876258 probe: refactor probeMain 2017-01-23 12:11:35 +01:00
Mike Lang 685af493bf ecs probe: Allow cache settings to be tweaked 2017-01-12 11:37:23 -08:00
Alfonso Acosta ab28a0bfac Fix linter errors in ignored file 2016-12-22 11:12:16 +00:00
Alfonso Acosta a2d09b4c23 Run gofmt (file was ignored by linter) 2016-12-22 10:04:35 +00:00
Alfonso Acosta bae1533b12 Add comment regarding loopback address hardcoding 2016-12-21 10:10:00 +00:00
Alfonso Acosta 8b45525305 Hardcode 127.0.0.1 as loopback IP for default target 2016-12-20 11:18:13 +00:00
Alfonso Acosta 06ff64d477 Forward OS/Kernel version to checkpoint
Useful to prioritize ebpf testing

Also:
* Make treatment of kernel release and version consistent across Darwin/Linux
2016-12-19 20:08:08 +00:00
Michael Schubert 3f969f20f2 prog/main: use flags.app.port for default target
User can control the webserver listen address with `-app.http.address`.
If they do, `scope --mode probe ...` should use the port part of address
in the default target and not ':4040'. Otherwise we encounter a
`dial tcp 127.0.0.1:4040: getsockopt: connection refused` error and
`scope-probe` cannot report.

Signed-off-by: Michael Schubert <michael@kinvolk.io>
2016-12-16 17:15:03 +01:00
Mike Lang 7d845f9130 ecs reporter: Review feedback, some trivial renames 2016-12-15 14:11:58 -08:00
Mike Lang 9d1e46f81b ECS reporter: Use persistent client objects across reports
Not only does this allow us to re-use connections, but vitally it allows us
to make use of the new task and service caching within the client object.
2016-12-15 14:11:57 -08:00
Jonathan Lange 626e8a3e9f Neater way of doing it 2016-12-12 17:40:15 +00:00
Jonathan Lange 4fcf9a1e36 Add flag for logging headers 2016-12-12 17:12:28 +00:00
Jonathan Lange e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Mike Lang d0caee4748 Add some basic metadata to the ECS task/service details panels 2016-11-29 07:18:08 -08:00
Mike Lang b06fee8c0f Review feedback 2016-11-29 07:18:08 -08:00
Alfonso AcostaandMike Lang ab1d2d2c6d Add checkpoint flag for ECS 2016-11-29 07:18:08 -08:00
Mike Lang 88499b4e9d Add --probe.ecs flag to enable running the ECS probe tagger 2016-11-29 07:17:16 -08: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
Alfonso AcostaandGitHub 3ba83ddd53 Merge pull request #1973 from weaveworks/1938-enrich-weave-details-panel
Extend metadata in details panel for Weave Net nodes
2016-11-04 09:44:27 +01:00
Alfonso Acosta 0884955c95 Extend metadata in details panel for Weave Net nodes 2016-11-03 15:57:23 +00:00
Mike LangandGitHub 03661f309a Merge pull request #1917 from weaveworks/1916-dont-leak-goroutines
Timeout reads and writes in the http server.
2016-11-02 15:25:55 -07:00
Tom Wilkie e8126faedd Review feedback 2016-10-12 17:29:29 +01:00
Tom WilkieandGitHub 7d88279758 Add prometheus metrics endpoint to probes. (#1915) 2016-10-10 14:30:34 -07:00
Tom Wilkie 0bde1b62e1 Timeout reads and writes in the http server. 2016-10-10 14:22:18 -07:00
Tom WilkieandGitHub 727404c9b8 Extend logging middleware to optionally only log failed HTTP requests (#1909)
* Extend logging middleware to optionally only log failed HTTP requests

* Add a preconfigured logger for logging failed requests, use it in the app.

* Wide definition of success
2016-10-07 18:03:36 -07:00
Mike Lang ec37214778 Add flag to allow using external ui, and ability to upload to bucket during CI 2016-10-05 17:27:18 -07:00
Mike Lang 2c9f6c197f Split prog/static.go into two versions, and have a shim choose between them
This allows us to have both normal and external resource versions of static content
in the same binary, and switch with a flag
2016-10-05 17:26:57 -07:00
Tom WilkieandGitHub 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
Tom WilkieandGitHub 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 c5ac315b38 Review feedback 2016-09-20 16:50:29 +00:00
Alfonso Acosta 0223b0b385 Implement DNS snooper 2016-09-19 14:38:59 +00:00
Mike Lang 5a4ee00b58 app: Add graceful shutdown for http server
This will let it finish up existing connections before exiting,
which makes things like rolling restarts behave much better.
2016-09-08 15:43:54 -07:00
Alfonso Acosta a904620908 Improve conntrack kernel-support detection for in-kernel compilations 2016-08-26 14:03:29 +00:00
Alfonso AcostaandGitHub 4cb002e360 Merge pull request #1817 from weaveworks/release-0.17
Release 0.17.1
2016-08-19 15:04:36 +01:00
Alfonso Acosta c10c58459b Fix spelling mistakes 2016-08-18 17:48:45 +00:00
Alfonso Acosta f8a67a41f7 Elide sensitive kubernetes flags from the logs 2016-08-18 15:33:07 +00:00
Alfonso Acosta 7435b4542c Fix typo 2016-08-18 11:11:30 +00:00
Alfonso Acosta 1bdff95f33 Extend kubernetes client flags to match kubectl 2016-08-17 15:16:58 +00: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 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
Alfonso Acosta 0c3235ae3d Review feedback 2016-08-11 15:41:07 +00:00
Alfonso Acosta 276ffa338e Elide service-token when logging commandline arguments 2016-08-11 15:07:08 +00:00
Tom WilkieandGitHub 1d3ad9e12b Also serve UI under /ui (#1752) 2016-08-04 15:35:46 +01:00
Jonathan LangeandGitHub 34beefa377 Merge pull request #1684 from weaveworks/decompress-memcache-1671
Add options for storing memcached reports with different compression levels
2016-07-15 14:03:38 +01:00
Jonathan Lange 60e14c1dc2 Plumb through an option for compression 2016-07-15 11:24:36 +01:00
Jonathan Lange 1ddc91f0ea Add flag for block profiling
Fixes #1672

Test by adding `--app.block.profile.rate=1`, running scope in
multi-tenant mode and browsing to http://<scope-url>/debug/pprof/
2016-07-14 14:45:50 +01:00