clearlinux / cloud-native-setup

Automation around setting up the cloud-native content (kubernetes) on Clear Linux.
Apache License 2.0
61 stars 41 forks source link

metrics: report: long or many node names render badly in legends #287

Open grahamwhaley opened 4 years ago

grahamwhaley commented 4 years ago

Having long node names, or many nodes or network connections, render very poorly in the pdf report graph legends. The tendency is for them to fall outside the page. It seems to be a symptom of ggplot2 and possibly knitr page size calculation and rendering.

Examples:

Many net connections

Long node names

Simple solutions such as trying to modify legend.margins etc. are, well, not simple.

There is a relevant discussion in the ggplot Issues over at https://github.com/tidyverse/ggplot2/issues/1502, which pretty much summaries as 'making all legend combos work for all situations is very very hard'.

It would be great if we could find a 'works for all' fix for this, but it seems non trivial.

askervin commented 4 years ago

Brainstorming: as we have only few nodes in scaling clusters, do you think we'd use the role of the node instead of hostname of the node in the report? For instance, if we'd just rename collectd .tar.gz files to m.tar.gz (for master) and w1.tar.gz (for the first worker etc). This would solve long hostname problem. We can include the hostnames to some tables in the PDF.

Long test names (like "pmem-off-1k-run2" in the first figure) can be considered user choice unlike hostnames.