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()`.
* 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
* 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
* 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.
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.
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.
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.
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.
* 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
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()
* 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
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
- 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