72 Commits

Author SHA1 Message Date
Bryan Boreham
871751873b Stop render package depending on probe
This dependency makes it harder to see the structure of the program,
and sometimes complicates compilation.

Mostly just changing the source of strings that are already exported
from the report package.  A few new strings have to be moved there,
plus the function `IsPauseImageName()`.
2019-09-15 17:03:04 +00:00
Bryan Boreham
15467d7310 Move host-related names out of probe code
Reduce the dependency on low-level libraries
2019-09-13 11:41:09 +00:00
Simon Howe
d3a36cf873 Load up fa5 instead of 4
- Switch to fa5 icons and tweak font-sizes a bit
2018-11-13 12:51:31 +01:00
Simon
e78f8a8de4 Revert "Upgrade to Font Awesome 5" 2018-11-12 11:22:19 +01:00
Simon Howe
2cc58f5b00 Switch to fa5 icons and tweak font-sizes a bit 2018-11-09 14:59:53 +01:00
Bryan Boreham
1279a02b7d Stop tagging pods with host ID
So they can be reported centrally, find the pod host ID from the child
containers.
2018-10-11 17:54:29 +00: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
Bryan Boreham
5edc85822b AddParent() function to optimise the case where there is only one parent
Avoids creating and discarding a StringSet just to carry the
parameters, and makes the code more readable too.
2018-07-17 13:51:46 +00:00
Roland Schilter
f012c23ca1 Sentence cased text everywhere (#3166)
* Sentence cased text everywhere

Follows Weave Cloud's direction of sentence case on most things.

* More space between sorter caret and label

* Use full topology name for table header
2018-05-17 17:30:38 -07:00
Roland Schilter
3de06b5a09 Support controls in more k8s topologies (#3110)
* Refactor: func has already access to probeID

* Allow controls for more k8s topologies

Controls for nodes generally need to know about the probe that is in
control of them.

This PR appends the probe ID info to k8s topologies CronJob, DaemonSet,
Service, and StatefulSet. Therefore allowing plugins to append controls.

* Remove superfluous error check

* Add some tests to verify controls allowance
2018-03-16 12:39:57 -07:00
Bryan Boreham
f72ced3380 Add topology.ReplaceNode() for efficiency (#3073)
* Add topology.ReplaceNode() for efficiency

In some places AddNode() was called after adding to an existing node,
in which case the Merge() is just a waste of time.
2018-02-19 10:13:31 +00:00
Filip Barl
f5bfa506d6 Verified the TODO comments and make durations be in seconds. 2017-11-03 10:43:41 +01:00
Filip Barl
320b9e240f Abstracted the report data types. 2017-11-03 10:43:41 +01:00
Filip Barl
6c0194b832 Show uptime durations in a more human format. 2017-11-03 10:43:41 +01:00
Tobias Klauser
89f3ce2e64 Simplify Utsname string conversion
Use Utsname from golang.org/x/sys/unix which contains byte array
instead of int8/uint8 array members. This allows to simplify the string
conversions of these members and the marshal.FromUtsname functions are
no longer needed.
2017-11-02 08:45:54 +01:00
Matthias Radestock
9dc50b5202 refactor: hide "empty set" constants
They are an implementation detail.
2017-07-03 01:26:22 +01:00
Matthias Radestock
a7cfd043fc fix fmt string error in test, found by linter 2017-06-21 21:56:34 +01:00
Matthias Radestock
4e0065a57d refactor: put all network detection code in one place 2017-06-20 09:23:52 +01:00
Matthias Radestock
19a6551de2 ignore local IPv6 addresses/networks
There is no point in paying attention to them since scope connection
tracking only deals in IPv4.
2017-06-20 09:04:08 +01: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
e8085b01b6 Use 'common' library 2016-12-07 11:22:38 +00:00
Alfonso Acosta
1cf66419d9 Make linter happy 2016-10-31 14:26:37 +00:00
Alfonso Acosta
253657887c Implement TTY resize for hosts 2016-10-31 12:11:25 +00:00
Alfonso Acosta
8e4dfd7987 Add Weave peers view 2016-10-24 15:33:30 +00: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
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
Alfonso Acosta
b7b64a7975 Use login shells in terminals 2016-08-22 17:42:38 +00: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
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
Matthias Radestock
21c188d600 Merge pull request #1739 from weaveworks/1730-no-node-copy
Remove and optimize more Copy()s
2016-08-12 12:30:54 +01:00
Alfonso Acosta
3892273096 Append namespace to endpoint scope for loopback connections 2016-08-10 10:43:04 +00:00
Matthias Radestock
1091225bf6 get rid of Node.Copy()
A shallow copy is sufficient. Which we get for free in most cases
since Node is passed around by value.
2016-08-02 12:42:39 +00:00
Alfonso Acosta
8a950a59d6 Remove Metric Add() method
* Helps reduce garbage (MakeMetric() now takes a slice and there's a shorter version MakeSingletonMetric())
* Fixes bug computing Max (Min) in samples since using MakeMetric()
  was causing a default Max/Min of zero.
* Simplifies code a bit
2016-08-01 16:58:11 +00:00
Alfonso Acosta
b8bf60c6f1 Use slices instead of linked lists for Metric
Also:

* Remove Gob encoder/decoder
* Stop using custom encoders/decoders for Timestamps (both ugorji and the Golang JSON codecs use nanosecond precision).
* Use idiomatic way to check for existence in metric.LastSample()
2016-08-01 10:21:57 +00:00
Tom Wilkie
b05ef74552 Report hostname and version in probe struct, and version in host node. 2016-04-26 09:25:15 +01:00
Tom Wilkie
99204e1ff7 Add k8s pod log control (#1298)
* Remove individually vendored k8s.io/kubernetes/pkg/<foo>

* Vendor the whole of vendor/k8s.io/kubernetes/pkg

* Add k8s pod log control

* Tag pods with host id and include them in the host topology as children.

* adding a basic test for kubernetes.Reporter.GetLogs
2016-04-21 13:48:50 +01:00
Paul Bellamy
1edeb8d190 Removing report.Node.WithID (#1315)
* removing usage of report.Node.WithID

* report.Topology.AddNode can use the node's ID field
2016-04-19 16:48:03 +01:00
Paul Bellamy
7632e0b3c5 Adding support for plugins, with basic example of iowait, and ebpf
Squash of:
* Include plugins in the report
* show plugin list in the UI
* moving metric and metadata templates into the probe reports
* update js for prime -> priority
* added retry to plugin handshake
* added iowait plugin
* review feedback
* plugin documentation
2016-04-12 17:22:14 +01:00
David Kaltschmidt
79b4232b08 Remove load5 and load15
* not really useful
* take up lots of real estate

Fixes #1267
2016-04-12 16:58:21 +01:00
Alfonso Acosta
2c4de6243a Review comment: move pty's Close 2016-04-01 12:17:09 +00:00
Alfonso Acosta
4a496073b0 More robust obtention of host shell command 2016-03-30 23:57:31 +00:00
Alfonso Acosta
59af5d28ad Review feedback: merge host controls with reporter 2016-03-29 17:14:15 +00:00
Alfonso Acosta
c1c40ad20d Add host-level terminals 2016-03-29 16:05:04 +00:00
Tom Wilkie
7e2e4c9c45 Fix spelling mistakes in the codebase. 2016-03-23 10:51:27 +00:00
Alfonso Acosta
b33c516758 Review feedback+test 2016-02-26 12:58:07 +00:00
Tom Wilkie
d4e58b9e33 Decouple Scope lifecycle from Weave lifecycle
- Run the Weave integrations regardless of if weave is detected.
- Make everything backoff and not spam the logs.
- Add miekg dns to vendor.
- Have the app periodically register with weaveDNS, and the probe do lookups there.
- Decide what the local networks are at runtime, not once at startup.
- Correctly resolve app ids, fixes #825
2016-02-09 14:24:57 +00:00
Alfonso Acosta
f1ac5f102f Fix net namespace reading in pre-3.8 kernels 2016-02-02 17:53:24 +00:00
Tom Wilkie
6b56475766 Use ps.Map for Counters and Sets, remove Metadata in favour of Latest.
Also
- Add more complicated report.json for benchmark
- Break up report/topology.go
- Implement our own DeepEqual for ps.Map
2016-01-22 15:10:32 -08:00
Paul Bellamy
bf57aeb8d9 Rename the various metric keys so they don't accidentally overlap 2016-01-20 16:14:32 +00:00
Paul Bellamy
e30c9dc264 use constants for the topology names in Parents/metadata/metrics 2016-01-19 16:47:48 +01:00