Commit Graph

879 Commits

Author SHA1 Message Date
Bryan Boreham
5cba126c12 Merge pull request #3600 from weaveworks/expose-probe-metrics
Expose probe metrics to Prometheus
2019-08-20 14:35:06 +01:00
Bryan Boreham
eba9f31f3f fix(probe): restart conntrack handler periodically to clear out data
We observe a slow increase in connections reported, and are unable to
find the root cause, so clear down the data every six hours and start
from a clean sheet.
2019-08-13 16:30:56 +00:00
Bryan Boreham
6e715d2697 fix(probe): Loosen ebpf parameters to reduce restarts
Delay kernel events by up to 0.2ms, to reduce the chance the ebpf
reporter sends them out-of-order, and allow out-of-order events to
happen up to once a minute without giving up on the ebpf reporter.
2019-08-13 16:17:23 +00:00
Bryan Boreham
609d9a7506 Merge pull request #3363 from princerachit/format-error-log
refactor(logs): Add reporter name to error logs.
2019-07-31 14:51:30 +01:00
Bryan Boreham
5e57b0dbcf Add metrics for conntrack and ebpf errors 2019-07-09 13:01:47 +00:00
Bryan Boreham
20e7d5d476 Add metric counting report publish attempts and errors 2019-07-09 13:01:26 +00:00
Bryan Boreham
ab7a7dcb16 Expose probe metrics to Prometheus
We are already timing all report, tag and tick operations.
If Prometheus is in use, expose those metrics that way.

Adjust metrics naming to fit with Prometheus norms.

The previous way these metrics were exposed was via SIGUSR1, and we
can only have one "sink", so make it either-or.

Signed-off-by: Bryan Boreham <bryan@weave.works>
2019-07-09 12:34:05 +00:00
Bryan Boreham
161014857d Merge pull request #3646 from weaveworks/remove-useless-metric
fix: remove unused metric SpyDuration
2019-07-04 17:37:16 +01:00
Bryan Boreham
c1e110ac7b fix: remove unused metric SpyDuration
The call to register this metric was removed in #633 over three years ago.
If it isn't registered then nobody can see the values.
The measurement is duplicated by metrics added in #658.
2019-07-04 13:53:00 +00:00
Bryan Boreham
1e6a6a7bb4 fix: handle errors reported by the conntrack package
In particular, ENOBUFS which indicates data has been dropped.
With this change the collector will restart, thus resynchronising with
the OS.
2019-07-04 13:30:46 +00:00
Bryan Boreham
380dd8357f fix(probe): Use a buffered chan to reduce the chance of losing events
Event notifications from Docker will be dropped if not collected
quickly enough; using a buffered chan reduces the chance of this
happening.
2019-06-05 10:36:38 +00:00
Bryan Boreham
7a93c73343 Always delete container info when we get a 'destroy' event
Previously it would only delete if Docker said the container didn't
exist, which is a race between Docker sending the event and Docker
removing the info from its own records.

Extract a couple of functions to make the action clearer.
2019-05-24 16:31:42 +00:00
Satyam Zode
36361d6b7d Add Kubernetes Job support to Weave Scope
This covers:
- Implementation of the job resource in probe
- Reporter changes for the job
- Add Describe Control to the job
- Pass job object to the kube controller renderer

ToDo:
- Need to decide the shape for the Job.

Signed-off-by: Satyam Zode <satyamzode@gmail.com>
2019-05-19 02:36:45 +05:30
Filip Barl
cdc33855d4 Merge pull request #3589 from openebs/feature/kubectl-describe
Add describe control to all k8s resources
2019-05-17 13:37:15 +02:00
Akash Srivastava
5a53ca350e Update rank of DeletePod control from 1 to 3
Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
2019-05-17 15:59:08 +05:30
Bryan Boreham
72882835d5 Merge pull request #3566 from tiriplicamihai/fix-dns-snooper-multiple-cnames
Fix dnssnooper probe for multiple CNAMEs.
2019-05-07 16:04:18 +01:00
tiriplicamihai
0b4e26ed77 Fix formatting. 2019-04-30 19:24:23 +03:00
tiriplicamihai
92d3c1d5e9 Fix test data. 2019-04-30 19:09:02 +03:00
tiriplicamihai
1fbe648e82 Add newline. 2019-04-30 18:41:16 +03:00
tiriplicamihai
364a7423a5 Add tests for dns snooper. 2019-04-30 18:38:07 +03:00
Akash Srivastava
029bbbcec8 Add describe control to all k8s resources
This commit will add a new control i.e. Describe
which will describe a k8s resource similar to kubectl describe.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
2019-04-01 11:22:12 +05:30
Akash Srivastava
8d784b7102 Upgrade client-go version to 10.0.0
This will
Upgrade:
        - k8s.io/client-go v10.0.0
	- k8s.io/api version to kubernetes-1.13.0
	- k8s.io/apimachinery version to kubernetes-1.13.0
        - github.com/imdario/mergo to v0.3.5

Add:
        - k8s.io/klog v0.1.0
        - sigs.k8s.io/yaml v1.1.0

Changes:
        - modified:   probe/kubernetes/client.go
        - modified:   probe/kubernetes/controls.go

To ScaleUp and ScaleDown a Deployment, Scale method was used,
which is removed in client-go-10.0.0
Instead of Scale use UpdateScale method of Deployment to
ScaleUp and ScaleDown the Deployment.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
2019-03-29 17:04:14 +05:30
Filip Barl
e66a3e08dc Add a confirmation dialog for deleting a pod. 2019-02-26 11:57:00 +01:00
Filip Barl
97fdcdc525 Option to censor raw reports by command line args and env vars. 2019-02-15 17:31:08 +01:00
tiriplicamihai
a6bc6b0148 Use break instead of continue. 2019-01-28 23:06:18 +02:00
tiriplicamihai
1aadf5c606 Fix dnssnooper probe for multiple CNAMEs. 2019-01-28 13:49:16 +02:00
Akash Srivastava
60a1c66430 Fix one pod to multiple PVC connection
Read all the PVC source from a pod spec
and add adjacency between the pod and its PVCs.

Signed-off-by: Akash Srivastava <akashsrivastava4927@gmail.com>
2019-01-13 20:10:51 +05:30
CarlosEDP
4f8fc5e010 Add ARM64 build 2019-01-02 12:08:49 -02:00
Bryan Boreham
fb9c9e0140 Subtract page cache from container memory usage
So that Scope numbers match Docker numbers.
2018-11-21 16:07:57 +00:00
Bryan Boreham
476ef275e6 Merge pull request #3298 from weaveworks/conntrack-netlink-upstream
Probe: use netlink to talk to conntrack
2018-11-20 11:14:56 +00:00
Bryan Boreham
94dbee2124 Move "hideous hack" for Kubernetes service network from probe to app
This avoids side-effects from reporting Kubernetes from a
cluster-level probe, and removes a lie from the probe data.

Rather than do the work every time the probe sends a report, we do it
every time the app renders endpoints, which should be once per merged
report set.
2018-11-19 14:54:20 +00:00
Bryan Boreham
c732fee433 Don't add closed connections to 'activeFlows' 2018-11-14 15:34:58 +00:00
Bryan Boreham
95ce2cb1a8 Add build constraint on Linux-only features
Split Reporter into Linux and non-Linux parts, and stubbed it out for
non-Linux targets.
2018-11-14 15:34:58 +00:00
Bryan Boreham
01ef6a104d Eliminate connectionTrackerConfig struct 2018-11-14 15:34:58 +00:00
Bryan Boreham
e3d42676a3 Add back some parts of the original cli code 2018-11-14 15:34:58 +00:00
Bryan Boreham
71c59e87d1 Update comment 2018-11-14 15:34:58 +00:00
Bryan Boreham
f4dc368955 Don't buffer TIME_WAIT flows on conntrack start-up
When the probe first starts we should only be interested in active
connections, and if the loop re-starts it's probably because too many
connections are opening and closing to keep up with, so it's good to
drop any that are already closed then too.

Refactor the code so `handleFlow` is only called on events, and handle
the initial list of connections directly.
2018-11-14 15:34:58 +00:00
Bryan Boreham
c627802664 Refactor: remove some code that is now unnecessary
- don't need another wrapper round `conntrack.Connections()`
- logPipe() was only for the command-line conntrack
- nobody closes the `event` chan now, so no need to pre-check for quit
2018-11-14 15:34:58 +00:00
Bryan Boreham
a29e9fa27a Update to match upstream conntrack library 2018-11-14 15:34:57 +00:00
Bryan Boreham
b9405bcc4b Remove our own copy of the upstream library 2018-11-14 15:34:57 +00:00
Bryan Boreham
73f35fd6d9 Handle nat status from conntrack via netlink
Replacement for the --any-nat command-line parameter
2018-11-14 15:34:57 +00:00
Bryan Boreham
ed6a010330 Decode conntrack status from netlink 2018-11-14 15:34:57 +00:00
Bryan Boreham
3314e1f0c7 Move constants to headers.go to be more like upstream 2018-11-14 15:34:57 +00:00
Bryan Boreham
7a68b5bdb0 Use Nfgenmsg from unix package instead of declaring locally 2018-11-14 15:34:57 +00:00
Bryan Boreham
8b04ef7359 Move conntrack code out to client.go to match upstream 2018-11-14 15:34:57 +00:00
Joseph Glanville
ac63937df7 Switch to new conntrack library 2018-11-14 15:34:57 +00:00
Joseph Glanville
853196f6d1 Import conntrack library 2018-11-14 15:34:57 +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
Bryan Boreham
73de9c3f03 Merge pull request #3422 from weaveworks/upgrade-font-awesome-5
Upgrade to Font Awesome 5
2018-11-12 10:02:47 +00:00