diff options
Diffstat (limited to 'monitoring/ceph-mixin/dashboards/host.libsonnet')
-rw-r--r-- | monitoring/ceph-mixin/dashboards/host.libsonnet | 48 |
1 files changed, 21 insertions, 27 deletions
diff --git a/monitoring/ceph-mixin/dashboards/host.libsonnet b/monitoring/ceph-mixin/dashboards/host.libsonnet index 674f678a170..cf7e045695a 100644 --- a/monitoring/ceph-mixin/dashboards/host.libsonnet +++ b/monitoring/ceph-mixin/dashboards/host.libsonnet @@ -42,12 +42,9 @@ local g = import 'grafonnet/grafana.libsonnet'; $.addClusterTemplate() ) .addTemplate( - $.addJobTemplate() - ) - .addTemplate( $.addTemplateSchema('osd_hosts', '$datasource', - 'label_values(ceph_disk_occupation{%(matchers)s}, exported_instance)' % $.matchers(), + 'label_values(ceph_osd_metadata{%(matchers)s}, hostname)' % $.matchers(), 1, true, 1, @@ -57,7 +54,7 @@ local g = import 'grafonnet/grafana.libsonnet'; .addTemplate( $.addTemplateSchema('mon_hosts', '$datasource', - 'label_values(ceph_mon_metadata{%(matchers)s}, ceph_daemon)' % $.matchers(), + 'label_values(ceph_mon_metadata{%(matchers)s}, hostname)' % $.matchers(), 1, true, 1, @@ -67,7 +64,7 @@ local g = import 'grafonnet/grafana.libsonnet'; .addTemplate( $.addTemplateSchema('mds_hosts', '$datasource', - 'label_values(ceph_mds_inodes{%(matchers)s}, ceph_daemon)' % $.matchers(), + 'label_values(ceph_mds_inodes{hostname, %(matchers)s})' % $.matchers(), 1, true, 1, @@ -77,7 +74,7 @@ local g = import 'grafonnet/grafana.libsonnet'; .addTemplate( $.addTemplateSchema('rgw_hosts', '$datasource', - 'label_values(ceph_rgw_metadata{%(matchers)s}, ceph_daemon)' % $.matchers(), + 'label_values(ceph_rgw_metadata{hostname, %(matchers)s})' % $.matchers(), 1, true, 1, @@ -188,7 +185,7 @@ local g = import 'grafonnet/grafana.libsonnet'; "instance", "$1", "instance", "([^.:]*).*" ) * on(instance, device) group_left(ceph_daemon) label_replace( label_replace( - ceph_disk_occupation_human{%(matchers)s, instance=~"($osd_hosts).*"}, + ceph_disk_occupation_human{instance=~"($osd_hosts).*", %(matchers)s}, "device", "$1", "device", "/dev/(.*)" ), "instance", "$1", "instance", "([^.:]*).*" ) @@ -209,17 +206,17 @@ local g = import 'grafonnet/grafana.libsonnet'; ||| sum ( ( - rate(node_network_receive_bytes{instance=~"($osd_hosts|mon_hosts|mds_hosts|rgw_hosts).*",device!="lo"}[$__rate_interval]) or - rate(node_network_receive_bytes_total{instance=~"($osd_hosts|mon_hosts|mds_hosts|rgw_hosts).*",device!="lo"}[$__rate_interval]) + rate(node_network_receive_bytes{instance=~"($osd_hosts|$mon_hosts|$mds_hosts|$rgw_hosts).*",device!="lo"}[$__rate_interval]) or + rate(node_network_receive_bytes_total{instance=~"($osd_hosts|$mon_hosts|$mds_hosts|$rgw_hosts).*",device!="lo"}[$__rate_interval]) ) unless on (device, instance) - label_replace((bonding_slaves > 0), "device", "$1", "master", "(.+)") + label_replace((node_bonding_slaves > 0), "device", "$1", "master", "(.+)") ) + sum ( ( - rate(node_network_transmit_bytes{instance=~"($osd_hosts|mon_hosts|mds_hosts|rgw_hosts).*",device!="lo"}[$__rate_interval]) or - rate(node_network_transmit_bytes_total{instance=~"($osd_hosts|mon_hosts|mds_hosts|rgw_hosts).*",device!="lo"}[$__rate_interval]) + rate(node_network_transmit_bytes{instance=~"($osd_hosts|$mon_hosts|$mds_hosts|$rgw_hosts).*",device!="lo"}[$__rate_interval]) or + rate(node_network_transmit_bytes_total{instance=~"($osd_hosts|$mon_hosts|$mds_hosts|$rgw_hosts).*",device!="lo"}[$__rate_interval]) ) unless on (device, instance) - label_replace((bonding_slaves > 0), "device", "$1", "master", "(.+)") + label_replace((node_bonding_slaves > 0), "device", "$1", "master", "(.+)") ) |||, true, @@ -271,7 +268,7 @@ local g = import 'grafonnet/grafana.libsonnet'; rate(node_network_transmit_bytes{instance=~"($osd_hosts|$mon_hosts|$mds_hosts|$rgw_hosts).*",device!="lo"}[$__rate_interval]) or rate(node_network_transmit_bytes_total{instance=~"($osd_hosts|$mon_hosts|$mds_hosts|$rgw_hosts).*",device!="lo"}[$__rate_interval]) ) unless on (device, instance) - label_replace((bonding_slaves > 0), "device", "$1", "master", "(.+)")) + label_replace((node_bonding_slaves > 0), "device", "$1", "master", "(.+)")) )) |||, '{{instance}}', @@ -313,17 +310,14 @@ local g = import 'grafonnet/grafana.libsonnet'; $.addClusterTemplate() ) .addTemplate( - $.addJobTemplate() - ) - .addTemplate( $.addTemplateSchema('ceph_hosts', '$datasource', - if $._config.showMultiCluster then ('label_values({%(clusterMatcher)s}, instance)' % $.matchers()) else 'label_values(instance)', + 'label_values({__name__=~"ceph_.+_metadata", %(matchers)s}, hostname)' % $.matchers(), 1, - false, - 3, - 'Hostname', - '([^.:]*).*') + true, + 1, + null, + '([^.]*).*') ) .addPanels([ $.addRowSchema(false, true, '$ceph_hosts System Overview') + { gridPos: { x: 0, y: 0, w: 24, h: 1 } }, @@ -332,7 +326,7 @@ local g = import 'grafonnet/grafana.libsonnet'; 'OSDs', '', 'current', - "count(sum by (ceph_daemon) (ceph_osd_metadata{%(matchers)s, hostname='$ceph_hosts'}))" % $.matchers(), + 'count(sum by (ceph_daemon) (ceph_osd_metadata{%(matchers)s}))' % $.matchers(), null, 'time_series', 0, @@ -532,7 +526,7 @@ local g = import 'grafonnet/grafana.libsonnet'; ||| sum( ceph_osd_stat_bytes{%(matchers)s} and - on (ceph_daemon) ceph_disk_occupation{%(matchers)s, instance=~"($ceph_hosts)([\\\\.:].*)?"} + on (ceph_daemon) ceph_disk_occupation{instance=~"($ceph_hosts)([\\\\.:].*)?", %(matchers)s} ) ||| % $.matchers(), null, @@ -709,7 +703,7 @@ local g = import 'grafonnet/grafana.libsonnet'; rate(node_disk_io_time_seconds_total{instance=~"($ceph_hosts)([\\\\.:].*)?"}[$__rate_interval]) * 100 ), "instance", "$1", "instance", "([^:.]*).*" ) * on(instance, device) group_left(ceph_daemon) label_replace( - label_replace(ceph_disk_occupation_human{%(matchers)s, instance=~"($ceph_hosts)([\\\\.:].*)?"}, + label_replace(ceph_disk_occupation_human{instance=~"($ceph_hosts)([\\\\.:].*)?", %(matchers)s}, "device", "$1", "device", "/dev/(.*)"), "instance", "$1", "instance", "([^:.]*).*" ) ||| % $.matchers(), @@ -786,7 +780,7 @@ local g = import 'grafonnet/grafana.libsonnet'; $.addTargetSchema( ||| topk(10, - (sum by (instance)(ceph_daemon_health_metrics{type="SLOW_OPS", ceph_daemon=~"osd.*"})) + (sum by (instance)(ceph_daemon_health_metrics{type="SLOW_OPS", ceph_daemon=~"osd.*", %(matchers)s})) ) ||| % $.matchers(), '', |