Bryan Boreham
aa0aab4094
multitenant: only count real hosts for billing
...
PR #3822 made the kubernetes probe send host nodes, so we need to
exclude them from counting when billing.
2021-05-20 14:29:39 +00:00
Bryan Boreham
5318498d9a
improvement: make command-line parsing more robust
2020-06-11 11:15:35 +00:00
Bryan Boreham
70240fc82d
billing: cope with spy-interval set longer than publish-interval
2020-06-11 11:15:35 +00:00
Bryan Boreham
b117b1a5ef
cosmetic: move misplaced import
2020-05-19 10:09:52 +00:00
Bryan Boreham
ad82fafde8
multitenant: scan container command-lines as well as process
2020-05-19 10:09:28 +00:00
Bryan Boreham
f83ad517d8
multitenant: extract command-line parsing function and add test
2020-05-19 10:07:23 +00:00
Bryan Boreham
104b9cba50
refactor: Call Close() on collector
...
Doesn't do anything at present, but will be used later.
Change the signature on BillingEmitter.Close() to match. Note we didn't use the error returned.
2020-04-13 19:11:34 +00:00
Bryan Boreham
8c46367808
fix(multitenant): move use of rounding map inside lock
2020-04-13 16:16:20 +00:00
Bryan Boreham
3f11352435
enhancement(multitenant): Track rounding error in billing calculation
...
Billing takes an integer number of seconds, so keep track of the
amount lost to rounding when the publish interval is not an integer.
2020-04-10 19:04:50 +00:00
Bryan Boreham
c784acc20d
Revert change to use report timestamp
...
This reverts commit 6b72246fe6 .
The app merges reports within a 15-second window of its own time, so
if one or more probes have a time that is several seconds different
they will get excluded from the window.
2020-03-28 13:58:34 +00:00
Bryan Boreham
6b72246fe6
fix (multitenant collector): Use consistent report timestamp
...
Previously the code called `time.Now()` in two different places so the
timestamps didn't match. Now we use the timestamp of the report itself.
Add the collector's local time to the report if it didn't have one.
2020-03-26 19:15:34 +00:00
Bryan Boreham
53701aca1f
Cache the last-known report interval per user
...
Delta reports don't contain the string we are looking for, so remember
it from the last full report.
2020-03-06 18:03:51 +00:00
Bryan Boreham
329023b7c5
Improve calculation of usage in multitenant code
...
Use the duration supplied, if there is one.
It was looking for a process named "scope-probe", whereas the
executable is just named "scope".
2020-03-06 13:29:54 +00:00
Marc Carré
2ba50b8b3d
Update golang.org/x/net/context to latest
...
```
$ gvt delete golang.org/x/net/context
$ gvt fetch golang.org/x/net/context
2018/07/23 18:03:49 Fetching: golang.org/x/net/context
$ git grep -l "golang.org/x/net/context" | grep -v vendor | xargs sed -i '' 's:golang.org/x/net/context:context:g'
$ git grep -l "context/ctxhttp" | grep -v vendor | xargs sed -i '' 's:context/ctxhttp:golang.org/x/net/context/ctxhttp:g'
$ gofmt -s -w app
$ gofmt -s -w common
$ gofmt -s -w probe
$ gofmt -s -w prog
$ gofmt -s -w tools
```
fixed a bunch of:
```
cannot use func literal (type func("github.com/weaveworks/scope/vendor/golang.org/x/net/context".Context) error) as type func("context".Context) error
```
2018-07-23 20:10:18 +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
Jonathan Lange
f9e37a21f5
Continue processing reports if billing fails
2017-09-22 12:20:10 +01:00
Marcus Cobden
9fded9d34e
Add weavenet metrics to billing
2017-05-09 15:33:12 +00:00
Paul Bellamy
fbf74b8d40
Add NodeSeconds to billing emitter
2017-04-04 10:33:19 +01: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