Commit Graph

84 Commits

Author SHA1 Message Date
Bryan Boreham
11e76f1740 feature(app): Add a debugging summary function, exposed via http
URL is /admin/summary
2019-09-17 10:48:23 +00:00
Bryan Boreham
89363f5dcf Defer metrics registration until we need it
This avoids app-specific metrics appearing in the probe.
2019-07-04 14:24:22 +00:00
Bryan Boreham
62d55596c6 Merge pull request #3393 from ycao56/basic-auth
Add http Basic Auth
2018-11-07 14:32:03 +00:00
Yu Cao
308f923e48 use github.com/goji/httpauth instead 2018-11-01 17:51:24 -04:00
Yu Cao
b2a664c27b fix build 2018-10-18 15:09:17 -04:00
Yu Cao
fcdd217057 use env to override basic auth settings 2018-10-17 19:25:41 -04:00
Yu Cao
b5190d45cd basic auth 2018-10-17 19:25:12 -04:00
Bryan Boreham
05b350850f Drop topologies which are way too big 2018-10-11 17:20:16 +00:00
Marcus Cobden
67b887cb5d Add middleware to detect trace context on HTTP 2018-08-28 13:32:29 +01:00
Marcus Cobden
02ebac68e4 Add a CLI flag to configure the service name 2018-08-09 14:06:57 +01:00
Marcus Cobden
00f311c50a Add Jaeger initialisation for distributed tracing 2018-08-09 13:18:13 +01:00
Marc Carré
10f6aaf9b7 Pass logger to middleware.Log
Should fix:
```
2018/07/23 20:29:49 http: panic serving 10.244.204.241:34716: runtime error: invalid memory address or nil pointer dereference
goroutine 1169 [running]:
net/http.(*conn).serve.func1(0xc420739a40)
/usr/local/go/src/net/http/server.go:1726 +0xd0
panic(0x17d5200, 0x2a7f5e0)
/usr/local/go/src/runtime/panic.go:502 +0x229
github.com/weaveworks/scope/vendor/github.com/weaveworks/common/middleware.Log.Wrap.func1(0x1dc60e0, 0xc4215e7a40, 0xc4202cee00)
/go/src/github.com/weaveworks/scope/vendor/github.com/weaveworks/common/middleware/logging.go:40 +0x3c7
[...]
```
2018-07-23 22:42:54 +02:00
Marc Carré
bcbc462842 Fix probe & app's shutdown to please signals.SignalHandlerLoop
Fixes:
```
not enough arguments in call to signals.SignalHandlerLoop
	have ()
	want (logging.Interface, ...signals.SignalReceiver)
```
2018-07-23 20:10:19 +02:00
Marc Carré
e07b093b1c Scope now uses signals.SignalHandlerLoop instead of common.*
This fixes:
```
prog/app.go:310:2: undefined: "github.com/weaveworks/scope/vendor/github.com/weaveworks/weave/common".SignalHandlerLoop
prog/probe.go:309:2: undefined: "github.com/weaveworks/scope/vendor/github.com/weaveworks/weave/common".SignalHandlerLoop
```
2018-07-23 20:10:19 +02:00
Marc Carré
d46c2266ce Change Sirupsen/logrus to sirupsen/logrus
```
$ git grep -l Sirupsen | grep -v vendor | xargs sed -i '' 's:github.com/Sirupsen/logrus:github.com/sirupsen/logrus:g'
$ gofmt -s -w app
$ gofmt -s -w common
$ gofmt -s -w probe
$ gofmt -s -w prog
$ gofmt -s -w tools
```
2018-07-23 20:10:14 +02:00
Marcus Cobden
ba81924278 Add CLI flag for SQS RPC timeout 2018-05-04 10:11:25 +01:00
Bryan Boreham
fd35ac055d Use the aws config routine from weaveworks/common
so it will allow multiple keep-alive connections to the same
destination
2017-09-15 10:47:38 +00:00
Roland Schilter
0d381a34d6 Link scope-ui graphs clickable to prometheus queries (#2664)
scope-app:
* Adds `-app.metrics-graph` cli flag for configuring the base url to
use for graph links; supports :orgID and :query placeholders
* Assigns query URLs to existing metrics and appends empty metrics if missing

scope-ui:
* Extends <CloudFeature /> with option alwaysShow
* Adds <CloudLink /> to simplify routing when in cloud vs not in cloud
* Links metric graphs in the ui's node details view for all k8s
toplogies and containers so far
* Tracks metric graph click in mixpanel `scope.node.metric.click`
* Uses percentages and MB for CPU/Memory urls
* Passes timetravel timestamp to cortex in deeplink
2017-08-15 18:56:23 +01:00
Matthias Radestock
1f95e3efd4 obtain historic_reports capability from Reporter 2017-07-31 09:58:31 +01:00
Matthias Radestock
160ba8efa0 rename 'report_persistence' capability to 'historic_reports'
since that better captures the intent - the UI doesn't care about
reports get stored, but what reports it can retrieve.
2017-07-31 09:31:46 +01:00
Matthias Radestock
6c4efbb944 refactor: reduce number of args 2017-07-26 20:41:29 +01:00
Alfonso Acosta
6be7aa8be2 Add app capabilities to /api endpoint 2017-06-08 11:02:25 +00:00
Matthias Radestock
413dbc7f0c allow disabling of weaveDNS advertising/lookup
...while keeping other weave integrations, by setting
--weave.hostname=

Addresses a suggestion in #1550.
2017-04-15 00:02:07 +01:00
Paul Bellamy
e68ffd467e Add app/multitenant/billing_emitter to emit billing events 2017-03-22 10:41:34 +00:00
Alfonso Acosta
3431d64f77 Adapt middleware logger to upstream changes 2017-03-21 15:20:17 +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
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
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
Tom Wilkie
e8126faedd Review feedback 2016-10-12 17:29:29 +01:00
Tom Wilkie
0bde1b62e1 Timeout reads and writes in the http server. 2016-10-10 14:22:18 -07:00
Tom Wilkie
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
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
276ffa338e Elide service-token when logging commandline arguments 2016-08-11 15:07:08 +00:00
Tom Wilkie
1d3ad9e12b Also serve UI under /ui (#1752) 2016-08-04 15:35:46 +01:00
Jonathan Lange
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
Tom Wilkie
3173f6ad75 Use histograms over summaries 2016-07-12 11:15:57 +01:00
Paul Bellamy
bcddfd82c3 Added file collector, to serve a static report from file 2016-07-11 11:50:27 +01:00
Jonathan Lange
848574eced Make expiration a flag 2016-07-04 14:20:14 +01:00
Jonathan Lange
7dd2c6371e Parametrize window rather than assuming default 2016-07-04 13:50:54 +01:00
Jonathan Lange
c1dab17fb3 Make expiration a Duration 2016-07-04 13:30:23 +01:00
Jonathan Lange
f7bdedc149 Config struct for memcache client 2016-07-04 13:25:45 +01:00
Jonathan Lange
96520d7a46 Fixes to memcache support (#1628)
* Fix errors discovered in dev

* Log an error rather than aborting when memcache doesn't resolve
* Initialize map correctly

* Review tweaks
2016-07-04 11:00:11 +01:00
Jonathan Lange
9e0f0c51b9 Configuration type for AWS collector 2016-06-30 17:01:58 +01:00
Jonathan Lange
baacaa8cc5 Rename dynamoCollector to awsCollector 2016-06-30 16:44:43 +01:00