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>
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.
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.
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>
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>
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>
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>
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.
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.
- 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
When we receive an endpoint address without a protocol, our code states we
don't support them and that the format is deprecated.
In reality it was not the case, e.g:
When we received an address in the form of `127.0.0.1`, we'd attempt to
parse the scheme from it, we'd realise is does have one (would be
equivalent to "") and our function `parseEndpoint` would return `"", "", fmt.Error`.
Then, our `parseEndpointWithFallbackProtocol` would use the
fallback protocol (unix) and attempt to connect to `unix://127.0.0.1`.
This meant two things:
1. The error returned from `parseEndpoint` would never be thrown
2. We would connect anyways since the address is valid
This commit changes the assertion logic to match the intention of using
a fallback protocol when one is not supplied.