Skip to content
Merged
Show file tree
Hide file tree
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
35 changes: 34 additions & 1 deletion src/grafana_dashboards/cloud.json
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@
"datasource": {
"uid": "${prometheusds}"
},
"expr": "(sum by(aggregates) (openstack_nova_local_storage_available_bytes * on(hostname) group_left() openstack_placement_resource_allocation_ratio{resourcetype=\"DISK_GB\"})) - (sum by(aggregates) (openstack_nova_local_storage_used_bytes))",
"expr": "sum(${ceph_without_ephemeral} * ((ceph_cluster_total_bytes or vector(0)) - (ceph_cluster_total_used_bytes or vector(0)))) + ((1 - ${ceph_without_ephemeral}) * ((sum by(aggregates) (openstack_nova_local_storage_available_bytes * on(hostname) group_left() openstack_placement_resource_allocation_ratio{resourcetype=\"DISK_GB\"})) - (sum by(aggregates) (openstack_nova_local_storage_used_bytes))))",
"intervalFactor": 2,
"legendFormat": "{{aggregate}}",
"refId": "A",
Expand Down Expand Up @@ -1671,6 +1671,39 @@
"sort": 0,
"type": "query",
"useTags": false
},
{
"allValue": null,
"current": {
"selected": false,
"text": "0",
"value": "0"
},
"datasource": {
"uid": "${prometheusds}"
},
"definition": "query_result(max(((ceph_cluster_total_bytes or vector(0)) > bool(0)) * scalar(stddev(openstack_nova_local_storage_available_bytes) < bool(1e8)) * scalar(abs(sum(ceph_cluster_total_bytes or vector(0)) - max(openstack_nova_local_storage_available_bytes)) < bool(5e9))))",
"description": "Detect if Ceph is used as shared backend storage (no ephemeral available)",
"error": null,
"hide": 0,
"includeAll": false,
"label": "Ceph Shared Storage",
"multi": false,
"name": "ceph_without_ephemeral",
"options": [],
"query": {
"query": "query_result(max(((ceph_cluster_total_bytes or vector(0)) > bool(0)) * scalar(stddev(openstack_nova_local_storage_available_bytes) < bool(1e8)) * scalar(abs(sum(ceph_cluster_total_bytes or vector(0)) - max(openstack_nova_local_storage_available_bytes)) < bool(5e9))))",
"refId": "${prometheusds}-ceph_without_ephemeral-Variable-Query"
},
"refresh": 1,
"regex": "/.*}\\s+(\\d+)\\s.*/",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": "",
"tags": [],
"tagsQuery": "",
"type": "query",
"useTags": false
}
]
},
Expand Down
37 changes: 35 additions & 2 deletions src/grafana_dashboards/compute.json
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
"pluginVersion": "9.2.1",
"targets": [
{
"expr": "sum(openstack_nova_local_storage_used_bytes{hostname=~\"$hypervisor.*\"}) / sum(openstack_nova_local_storage_available_bytes{hostname=~\"$hypervisor.*\"}) * 100",
"expr": "sum(${ceph_without_ephemeral} * ((ceph_cluster_total_used_bytes or vector(0)) / clamp_min((ceph_cluster_total_bytes or vector(0)), 1) * 100)) + ((1 - ${ceph_without_ephemeral}) * (sum(openstack_nova_local_storage_used_bytes{hostname=~\"$hypervisor.*\"}) / sum(openstack_nova_local_storage_available_bytes{hostname=~\"$hypervisor.*\"}) * 100))",
"instant": false,
"interval": "",
"legendFormat": "",
Expand Down Expand Up @@ -621,7 +621,7 @@
"pluginVersion": "9.2.1",
"targets": [
{
"expr": "sum(openstack_nova_local_storage_available_bytes{hostname=~\"$hypervisor.*\"})",
"expr": "sum(${ceph_without_ephemeral} * (ceph_cluster_total_bytes or vector(0))) + ((1 - ${ceph_without_ephemeral}) * sum(openstack_nova_local_storage_available_bytes{hostname=~\"$hypervisor.*\"}))",
"instant": false,
"interval": "",
"legendFormat": "",
Expand Down Expand Up @@ -2367,6 +2367,39 @@
"skipUrlSync": false,
"sort": 0,
"type": "query"
},
{
"allValue": null,
"current": {
"selected": false,
"text": "0",
"value": "0"
},
"datasource": {
"uid": "${prometheusds}"
},
"definition": "query_result(max(((ceph_cluster_total_bytes or vector(0)) > bool(0)) * scalar(stddev(openstack_nova_local_storage_available_bytes) < bool(1e8)) * scalar(abs(sum(ceph_cluster_total_bytes or vector(0)) - max(openstack_nova_local_storage_available_bytes)) < bool(5e9))))",
"description": "Detect if Ceph is used as shared backend storage (no ephemeral available)",
"error": null,
"hide": 0,
"includeAll": false,
"label": "Ceph Shared Storage",
"multi": false,
"name": "ceph_without_ephemeral",
"options": [],
"query": {
"query": "query_result(max(((ceph_cluster_total_bytes or vector(0)) > bool(0)) * scalar(stddev(openstack_nova_local_storage_available_bytes) < bool(1e8)) * scalar(abs(sum(ceph_cluster_total_bytes or vector(0)) - max(openstack_nova_local_storage_available_bytes)) < bool(5e9))))",
"refId": "${prometheusds}-ceph_without_ephemeral-Variable-Query"
},
"refresh": 1,
"regex": "/.*}\\s+(\\d+)\\s.*/",
"skipUrlSync": false,
"sort": 0,
"tagValuesQuery": null,
"tags": [],
"tagsQuery": null,
"type": "query",
"useTags": false
}
]
},
Expand Down
Loading