diff --git a/dashboard/src/components/GraphItem.vue b/dashboard/src/components/GraphItem.vue index 3fc50ba8f..d828ede3d 100644 --- a/dashboard/src/components/GraphItem.vue +++ b/dashboard/src/components/GraphItem.vue @@ -45,7 +45,10 @@ function createGraphOptions({ yscale, period, displayLegend }) { tooltip: { callbacks: { title: (tooltipItem) => moment(tooltipItem[0].raw.x).format(period.tooltipFormat), - label: (tooltipItem) => yscale.ticks.callback(tooltipItem.raw.y) + label: (tooltipItem) => { + const datasetLabel = tooltipItem.chart.data.datasets[tooltipItem.datasetIndex].label; + return `${datasetLabel}: ${yscale.ticks.callback(tooltipItem.raw.y)}`; + } } } }, diff --git a/dashboard/src/components/SystemMetrics.vue b/dashboard/src/components/SystemMetrics.vue index 7e7fdcdbb..be372b368 100644 --- a/dashboard/src/components/SystemMetrics.vue +++ b/dashboard/src/components/SystemMetrics.vue @@ -15,7 +15,7 @@ const systemModel = SystemModel.create(); const periods = [ { hours: 0, label: t('app.graphs.period.live'), format: 'hh:mm A', tooltipFormat: 'hh:mm:ss A' }, - { hours: 1, label: t('app.graphs.period.1h'), format: 'hh:mm A', tooltipFormat: 'hh:mm A' }, + { hours: 1, label: t('app.graphs.period.1h'), format: 'hh:mm A', tooltipFormat: 'hh:mm:ss A' }, { hours: 6, label: t('app.graphs.period.6h'), format: 'hh:mm A', tooltipFormat: 'hh:mm A' }, { hours: 12, label: t('app.graphs.period.12h'), format: 'hh:mm A', tooltipFormat: 'hh:mm A' }, { hours: 24, label: t('app.graphs.period.24h'), format: 'hh:mm A', tooltipFormat: 'hh:mm A' }, diff --git a/dashboard/src/components/app/Graphs.vue b/dashboard/src/components/app/Graphs.vue index 53ef2d12a..c1d01a5fa 100644 --- a/dashboard/src/components/app/Graphs.vue +++ b/dashboard/src/components/app/Graphs.vue @@ -18,7 +18,7 @@ const systemModel = SystemModel.create(); const periods = [ { hours: 0, label: t('app.graphs.period.live'), format: 'hh:mm A', tooltipFormat: 'hh:mm:ss A' }, - { hours: 1, label: t('app.graphs.period.1h'), format: 'hh:mm A', tooltipFormat: 'hh:mm A' }, + { hours: 1, label: t('app.graphs.period.1h'), format: 'hh:mm A', tooltipFormat: 'hh:mm:ss A' }, { hours: 6, label: t('app.graphs.period.6h'), format: 'hh:mm A', tooltipFormat: 'hh:mm A' }, { hours: 12, label: t('app.graphs.period.12h'), format: 'hh:mm A', tooltipFormat: 'hh:mm A' }, { hours: 24, label: t('app.graphs.period.24h'), format: 'hh:mm A', tooltipFormat: 'hh:mm A' }, diff --git a/src/metrics.js b/src/metrics.js index 5bf1b6946..bfd1cca6f 100644 --- a/src/metrics.js +++ b/src/metrics.js @@ -356,6 +356,9 @@ async function readSystemFromGraphite(options) { // CPU: stress --cpu 2 --timeout 60 // Memory: stress --vm 2 --vm-bytes 256M +// Network: +// raw stats: ip -s link show eth0 +// testing: curl -o /dev/null https://ash-speed.hetzner.com/10GB.bin and then use nethogs eth0 (cycle with 'm') async function getSystem(options) { assert.strictEqual(typeof options, 'object');