Commit Graph

502 Commits

Author SHA1 Message Date
Roland Schilter
b2f4eeb4e6 Revert "Avoid global by passing metricsGraphURL down"
This reverts commit 1a002880ed38cbb8da73e41954513d7144b362c4.
2017-08-11 16:45:13 +01:00
Roland Schilter
8188b7aed2 Append links directly to metrics
The initial idea was to keep it separate since the unattached
links were also to be displayed distinctively from the metrics.
With the new design, unattached links are rendered in the same
list as metrics with attached links.

Therefore, we treat unattached metric links as an empty metric.
2017-08-11 16:45:13 +01:00
Roland Schilter
b8c75071fe Switch to migrated rules in kube-state-metrics 2017-08-11 16:45:13 +01:00
Roland Schilter
a7d8d9b233 Update Deployment and DaemonSet queries 2017-08-11 16:45:13 +01:00
Roland Schilter
f21cf472cc Avoid global by passing metricsGraphURL down 2017-08-11 16:45:13 +01:00
Roland Schilter
fa69c2078b Fix linting errors 2017-08-11 16:45:13 +01:00
Roland Schilter
86030a9b86 Expand on the prom query source in comments 2017-08-11 16:45:13 +01:00
Roland Schilter
9dcdc65e66 Improve comments; fix missing links w/o metrics 2017-08-11 16:45:13 +01:00
Roland Schilter
c3118d0397 Use ugorji over core json 2017-08-11 16:45:13 +01:00
Roland Schilter
3ddc6c866f Remove unnecessary fixture dependency of tests 2017-08-11 16:45:13 +01:00
Roland Schilter
d0527d28df Fix linting, cleanup, and add example to flag 2017-08-11 16:45:13 +01:00
Roland Schilter
702220f2ce Link scope-ui graphs clickable to prometheus queries
scope-app:
- Adds `-app.metrics-graph` cli flag for configuring the base url to
  use for graph links; supports `:orgID` and `:query` placeholders
- Renders `metric_links` in node detail API response

scope-ui:
- Extends `<CloudFeature />` with option `alwaysShow` and adds
  boolean `isCloud` property
- Links metric graphs in the ui's node details view for all k8s
  toplogies; or displays placeholder graph if no metrics available
2017-08-11 16:45:13 +01:00
Matthias Radestock
65cebed6c4 get rid of endpoint type indicators
The app stopped paying attention to these some time ago.

Removing them shrinks reports by 3-10%.
2017-07-30 08:38:56 +01:00
Mike Lang
486bdcc796 k8s: Use 'DaemonSet', 'StatefulSet' etc instead of 'Daemon Set', 'Stateful Set'
We can't search for terms with spaces.
2017-07-26 13:49:54 -07:00
Mike Lang
4d2b4541c9 Merge pull request #2724 from weaveworks/mike/k8s/jobs-and-petsets
kubernetes: Add StatefulSets and CronJobs
2017-07-19 16:27:53 -07:00
Mike Lang
ac96738ad0 render: In minor labels, display '0 things' instead of blank if zero things present
This also fixes a bug where k8s controller nodes would show up as 'Deployment of' without any number
2017-07-18 11:44:51 -07:00
Mike Lang
17fffb32e1 Add stateful sets and cronjobs to Controllers renderer
Since renderKubernetesTopologies was getting unweildy, refactored into a form
which was a bit clearer, if a bit more verbose.
2017-07-18 11:35:50 -07:00
Mike Lang
9fb6c46467 Add report topologies for Stateful Sets, Cron Jobs 2017-07-18 11:35:50 -07:00
Roland Schilter
a6d3542c89 Merge pull request #2713 from weaveworks/2708-reset-nodes-when-scope-app-restarted
Reset nodes in frontend when scope-app restarted
2017-07-14 19:02:41 +02:00
Matthias Radestock
ac9f7dfad1 simplify node propagation in ipToNode 2017-07-13 17:10:43 +01:00
Matthias Radestock
bd9fafff42 don't create *derived* nodes in nodeToIP
IP nodes are children of the "proper" topology nodes, not the other
way round. The former relationship is established in ipToNode.
2017-07-13 17:00:14 +01:00
Matthias Radestock
4a77e9bfac don't bother tracking the orignal node topology
We always join with the original renderer and hence all the nodes
produced by ipToNode will get their other data, including topology,
via that route.
2017-07-13 16:35:52 +01:00
Matthias Radestock
c7f94d8a74 join with original renderer in ConnectionJoin
This guarantees that the output won't contain bare nodes containing
just an id and topology, as produced by ipToNode. Previously this was
ensured by calling convention, now it's ensured by construction.
2017-07-13 16:28:02 +01:00
Matthias Radestock
387a68a3c7 tiny refactor: swap ConnectionJoin arg order
to match the style of other render HoFs, which take their inputs last.
2017-07-13 14:23:46 +01:00
Roland Schilter
5329efa528 Reset nodes in frontend when scope-app restarted
When the scope-app restarts, it no longer has a
reference to the previous node set. Therefore,
the delta update adds *all* nodes but does not
remove legacy ones.

`reset==true` tells the frontend to start fresh.

Fixes #2708
2017-07-13 14:28:17 +02:00
Mike Lang
1a2ad9c013 Merge pull request #2685 from weaveworks/mike/render/fix-map2parent-pseudo-id
render/pod: Fix a typo in Map2Parent where UnmanagedID will always be used for noParentsPseudoID
2017-07-05 14:02:38 -07:00
Matthias Radestock
d22d9d0768 Merge pull request #2682 from weaveworks/2681-image-counts
don't show container count in host detail panel image list

Fixes #2681.
2017-07-05 20:39:33 +01:00
Matthias Radestock
fd4f1f9d42 Merge pull request #2680 from weaveworks/2629-host-image-list
correct determination of a host's container images
2017-07-05 20:38:32 +01:00
Mike Lang
399cca026c render/pod: Fix a typo in Map2Parent where UnmanagedID will always be used for noParentsPseudoID
Thankfully we only ever set it to UnmanagedID right now, so no user-facing bug.
2017-07-05 11:33:06 -07:00
Matthias Radestock
c7a3f7c2fd Merge pull request #2675 from weaveworks/less-copy
refactor: remove unnecessary and dead Copy()
2017-07-05 14:33:31 +01:00
Matthias Radestock
0f4d17d868 don't show container count in host detail panel image list
The figure is inaccurate since it counts containers across all
hosts. Getting the count correct is non-trivial, so it's better to not
show the figure at all.

NB: the count still shows up on mouse-over of the link, but that is
defensible and not (very) confusing since the link represents the
image, not the image on a particular host, and it's the same count
that show up as the minor label in the container images view.

Fixes #2681.
2017-07-05 14:03:44 +01:00
Matthias Radestock
a0fb2e1d73 cosmetic(ish) 2017-07-05 12:49:23 +01:00
Matthias Radestock
0c122acf06 correct determination of a host's container images
The same container image may be in use on multiple hosts. The
latest-map HostNodeID of a node in the ContainerImage topology is
therefore meaningless - it gets set to whatever host reported that
image last in the time window covered by the report. Hence using it as
a basis for mapping to hosts, as we did, a) fails to associate images
with all the right hosts (hence they are missing from the host details
panel), and b) causes that association to change semi-randomly (hence
the list in the details panel is unstable).

By contrast, the host topology parents of container image nodes is the
complete set of all hosts the image is used on. So making that the
basis for mapping fixes the problem.

The same technique - mapping based on host parents rather than
latest-map HostNodeID - also works for the other nodes we are mapping:
processes, containers and pods. So we might as well use it there
too. That's also what Map2Parent does in other topology renderers.

Fixes #2629.
2017-07-05 09:09:32 +01:00
Matthias Radestock
57bc34f411 Merge pull request #2673 from weaveworks/mike/render/simplify-pods
render/pod: Remove unused options and incorrect code
2017-07-04 20:38:45 +01:00
Matthias Radestock
d4d3e5f184 correct comment 2017-07-04 20:37:55 +01:00
Matthias Radestock
a6491a35c3 refactor: remove unnecessary Copy() code 2017-07-04 07:35:30 +01:00
Matthias Radestock
f0ae2bd98c refactor: use inline StringSet constructor 2017-07-04 06:29:19 +01:00
Mike Lang
73b7641d9f render/pod: Remove unused code and options 2017-07-03 13:50:56 -07:00
Mike Lang
b7e24e82b5 render/pod: Remove redundant deployment mapping
This map function isn't actually needed.
Children are only populated from mapping to parents during rendering,
so there's no pre-existing replicasets to map.
Simply having the Map2Parent function map pods to deployments has it do the right thing.
2017-07-03 11:49:31 -07:00
Matthias Radestock
1f023890e4 refactor: optimise report.Map.Render() 2017-07-03 07:54:32 +01:00
Matthias Radestock
7119fb9de8 refactor: rename report.NewNetworks to MakeNetworks
for consistency - all the other report set constructors are called
'Make...'
2017-07-03 01:26:22 +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
c5b2c9dc3d Merge pull request #2668 from weaveworks/2665-connection-pid-attribution
ignore endpoints with >1 adjacency in process rendering

This eliminates the worst effects of #2665.
2017-06-30 13:10:10 +01:00
Matthias Radestock
708931f98a ignore endpoints with >1 adjacency in process rendering
This eliminates the worst effects of #2665.
2017-06-29 22:34:05 +01:00
Mike Lang
ef2b6f6c55 Remove replica sets
Use a special kind of selector renderer to elide replica sets from pod nodes
and directly reference deployment parents instead.
Do the inverse (replace replica sets with pods) during the mapping from pod to deployment.

Note we can no longer use renderParents since we're using a non-standard Selector
2017-06-29 10:13:15 -07:00
Matthias Radestock
3209d65d52 filter out unconnected pseudo nodes on the outside
The change is necessitated by the removal of procspied/ebpf endpoint
filtering in the renderers, as a result of which the odd
conntracked-only, unconnected pseudo node can sneak through.

This new way of doing things also makes renderers more composable and
robust, and more directly reflects the objective:
- in the process topologies, filter out all unconnected nodes
- in all other topologies, filter out unconnected pseudo nodes
2017-06-27 20:28:30 +01:00
Matthias Radestock
e5a04ec5a4 do not filter endpoints by procspied/ebpf in renderers
The filtering of endpoints causes some connections to get missed for
non-eBPF-tracked connections. Furthermore, the filtering of endpoints
is entirely pointless when the probes run eBPF since the filters just
pass through eBPF-tracked endpoints (for good reason too; because
otherwise some connections would be missed). So in that case it is
just costing CPU and removing it actually improves performance.

Note that removing the filtering does not result in over-counting
connections since that is done by source ip:port pairs.

Fixes #2551.
Fixes #2558.
2017-06-27 20:28:13 +01:00
Mike Lang
f7913ab550 Rewrite renderers for k8s/ecs/swarm to abstract common parts
Since all the renderers were doing almost-exactly the same thing, we abstract that out into a common function.
2017-06-27 10:19:04 -07:00
Mike Lang
f101f83c3d controllers topology: Map metrics for single nodes
* Maps metrics if there is a single pod in the controller, as per all other views.
* Also added heavy commenting on the increasingly-complex render chain
2017-06-27 10:19:04 -07:00
Mike Lang
8eb72cf276 Remove deployment and daemonset views, change combined to controllers and remove bare pods and replica sets
Since we still need to map through replica sets to find matching deployments, we simply filter them out as a post-step.
2017-06-27 10:19:04 -07:00