Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memcached-mixin: Switch to timeseries panels #1243

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions memcached-mixin/dashboards.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ local g = (import 'grafana-builder/grafana.libsonnet');
.addRow(
g.row('Hits')
.addPanel(
g.panel('Hit Rate') +
g.timeseriesPanel('Hit Rate') +
g.queryPanel('sum(rate(memcached_commands_total{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance", command="get", status="hit"}[$__rate_interval])) / sum(rate(memcached_commands_total{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", command="get"}[$__rate_interval]))', 'Hit Rate') +
{ yaxes: g.yaxes('percentunit') },
)
.addPanel(
g.panel('Top 20 Highest Connection Usage') +
g.timeseriesPanel('Top 20 Highest Connection Usage') +
g.queryPanel(|||
topk(20,
max by (%s, job, instance) (
Expand All @@ -34,22 +34,22 @@ local g = (import 'grafana-builder/grafana.libsonnet');
.addRow(
g.row('Ops')
.addPanel(
g.panel('Commands') +
g.timeseriesPanel('Commands') +
g.queryPanel('sum by(command, status) (rate(memcached_commands_total{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"}[$__rate_interval]))', '{{command}} {{status}}')
)
.addPanel(
g.panel('Evictions') +
g.timeseriesPanel('Evictions') +
g.queryPanel('sum by(instance) (rate(memcached_items_evicted_total{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"}[$__rate_interval]))', '{{instance}}')
)
.addPanel(
g.panel('Stored') +
g.timeseriesPanel('Stored') +
g.queryPanel('sum by(instance) (rate(memcached_items_total{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"}[$__rate_interval]))', '{{instance}}')
)
)
.addRow(
g.row('Resources')
.addPanel(
g.panel('CPU') +
g.timeseriesPanel('CPU') +
g.queryPanel(|||
sum by (instance) (
rate(memcached_process_user_cpu_seconds_total{%(cluster)s=~"$cluster", job=~"$job", instance=~"$instance"}[$__rate_interval]) +
Expand All @@ -59,22 +59,22 @@ local g = (import 'grafana-builder/grafana.libsonnet');
g.stack,
)
.addPanel(
g.panel('Memory') +
g.timeseriesPanel('Memory') +
g.queryPanel('sum by(instance) (memcached_current_bytes{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"})', '{{instance}}') +
g.stack +
{ yaxes: g.yaxes('bytes') },
// TODO add memcached_limit_bytes
)
.addPanel(
g.panel('Items') +
g.timeseriesPanel('Items') +
g.queryPanel('sum by(instance) (memcached_current_items{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"})', '{{instance}}') +
g.stack,
)
)
.addRow(
g.row('Network')
.addPanel(
g.panel('Current Connections') +
g.timeseriesPanel('Current Connections') +
g.queryPanel([
'sum by(instance) (memcached_current_connections{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"})',
// Be conservative showing the lowest setting for max connections among all selected instances.
Expand All @@ -85,28 +85,28 @@ local g = (import 'grafana-builder/grafana.libsonnet');
])
)
.addPanel(
g.panel('Connections / sec') +
g.timeseriesPanel('Connections / sec') +
g.queryPanel([
'sum by(instance) (rate(memcached_connections_total{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"}[$__rate_interval]))',
], [
'{{instance}}',
])
)
.addPanel(
g.panel('Bytes received') +
g.timeseriesPanel('Bytes received') +
g.queryPanel('sum by(instance) (rate(memcached_read_bytes_total{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"}[$__rate_interval]))', '{{instance}}') +
{ yaxes: g.yaxes('Bps') },
)
.addPanel(
g.panel('Bytes transmitted') +
g.timeseriesPanel('Bytes transmitted') +
g.queryPanel('sum by(instance) (rate(memcached_written_bytes_total{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"}[$__rate_interval]))', '{{instance}}') +
{ yaxes: g.yaxes('Bps') },
)
)
.addRow(
g.row('Memcached Info')
.addPanel(
g.panel('Memcached Info') +
g.timeseriesPanel('Memcached Info') +
g.tablePanel([
'count by (job, instance, version) (memcached_version{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"})',
'max by (job, instance) (memcached_uptime_seconds{' + $._config.clusterLabel + '=~"$cluster", job=~"$job", instance=~"$instance"})',
Expand Down