diff --git a/charms/openstack-exporter-k8s/src/grafana_dashboards/project.json b/charms/openstack-exporter-k8s/src/grafana_dashboards/project.json new file mode 100644 index 00000000..f779aff8 --- /dev/null +++ b/charms/openstack-exporter-k8s/src/grafana_dashboards/project.json @@ -0,0 +1,1257 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 52, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "description": "", + "gridPos": { + "h": 2, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 14, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "Projects with the same name may exist. In this case you can select the Project_id desired.", + "mode": "markdown" + }, + "pluginVersion": "9.5.3", + "transparent": true, + "type": "text" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 8, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Limits", + "type": "row" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "from": -1e+29, + "result": { + "text": "UNLIMITED" + }, + "to": -1 + }, + "type": "range" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 3, + "y": 3 + }, + "id": 4, + "options": { + "displayLabels": [ + "value" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.17", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_nova_limits_instances_max{tenant_id=\"$Project_id\"} - openstack_nova_limits_instances_used{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Free", + "queryType": "randomWalk", + "refId": "A" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_nova_limits_instances_used{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Used", + "refId": "B" + } + ], + "title": "Instances", + "transformations": [], + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [] + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "from": -1e+29, + "result": { + "text": "UNLIMITED" + }, + "to": -1 + }, + "type": "range" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 9, + "y": 3 + }, + "id": 2, + "options": { + "displayLabels": [ + "value" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ], + "width": 200 + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.17", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_nova_limits_vcpus_max{tenant_id=\"$Project_id\"} - openstack_nova_limits_vcpus_used{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Free", + "queryType": "randomWalk", + "refId": "A" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_nova_limits_vcpus_used{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Used", + "refId": "B" + } + ], + "title": "VCPUS", + "transformations": [], + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "unit": "decmbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "from": -1e+29, + "result": { + "text": "UNLIMITED" + }, + "to": -1 + }, + "type": "range" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 15, + "y": 3 + }, + "id": 3, + "options": { + "displayLabels": [ + "value" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ], + "width": 200 + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.17", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_nova_limits_memory_max{tenant_id=\"$Project_id\"} - openstack_nova_limits_memory_used{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Free", + "queryType": "randomWalk", + "refId": "A" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_nova_limits_memory_used{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Used", + "refId": "B" + } + ], + "title": "Memory", + "transformations": [ + { + "id": "filterByValue", + "options": { + "filters": [], + "match": "any", + "type": "exclude" + } + } + ], + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "unit": "gbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "from": -1e+29, + "result": { + "text": "UNLIMITED" + }, + "to": -1 + }, + "type": "range" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 3, + "y": 11 + }, + "id": 5, + "options": { + "displayLabels": [ + "value" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.17", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_cinder_limits_volume_max_gb{tenant_id=\"$Project_id\"} - openstack_cinder_limits_volume_used_gb{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Free", + "queryType": "randomWalk", + "refId": "A" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_cinder_limits_volume_used_gb{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "Used", + "refId": "B" + } + ], + "title": "Volumes", + "transformations": [], + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "from": -1e+29, + "result": { + "text": "UNLIMITED" + }, + "to": -1 + }, + "type": "range" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 9, + "y": 11 + }, + "id": 13, + "options": { + "displayLabels": [ + "value" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.17", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "sum by (project_id)(openstack_neutron_network_ip_availabilities_total{project_id=\"$Project_id\"}) - sum by (project_id)(openstack_neutron_network_ip_availabilities_used{project_id=\"$Project_id\"})", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Free", + "queryType": "randomWalk", + "refId": "A" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "sum by (project_id)(openstack_neutron_network_ip_availabilities_used{project_id=\"$Project_id\"})", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Used", + "refId": "B" + } + ], + "title": "IPs", + "transformations": [], + "transparent": true, + "type": "piechart" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + } + }, + "mappings": [], + "unit": "gbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Used" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Free" + }, + "properties": [ + { + "id": "mappings", + "value": [ + { + "options": { + "from": -1e+29, + "result": { + "text": "UNLIMITED" + }, + "to": -1 + }, + "type": "range" + } + ] + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 15, + "y": 11 + }, + "id": 6, + "options": { + "displayLabels": [ + "value" + ], + "legend": { + "displayMode": "table", + "placement": "right", + "showLegend": true, + "values": [ + "value" + ] + }, + "pieType": "pie", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "text": {}, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "7.5.17", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_cinder_limits_backup_max_gb{tenant_id=\"$Project_id\"} - openstack_cinder_limits_backup_used_gb{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Free", + "queryType": "randomWalk", + "refId": "A" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_cinder_limits_backup_used_gb{tenant_id=\"$Project_id\"}", + "hide": false, + "instant": true, + "interval": "", + "legendFormat": "Used", + "refId": "B" + } + ], + "title": "Backups", + "transformations": [], + "transparent": true, + "type": "piechart" + }, + { + "collapsed": false, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 19 + }, + "id": 12, + "panels": [], + "targets": [ + { + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "refId": "A" + } + ], + "title": "Virtual Machines Info", + "type": "row" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "auto", + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "__name__" + }, + "properties": [ + { + "id": "custom.width", + "value": 311 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "uuid" + }, + "properties": [ + { + "id": "custom.width", + "value": 319 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "name" + }, + "properties": [ + { + "id": "custom.width", + "value": 328 + } + ] + } + ] + }, + "gridPos": { + "h": 26, + "w": 24, + "x": 0, + "y": 20 + }, + "id": 10, + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "frameIndex": 1, + "showHeader": true, + "sortBy": [ + { + "desc": false, + "displayName": "status" + } + ] + }, + "pluginVersion": "9.5.3", + "targets": [ + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_nova_server_status{tenant_id=\"$Project_id\"}", + "format": "table", + "instant": false, + "interval": "", + "legendFormat": "{{name}}", + "queryType": "randomWalk", + "refId": "A" + }, + { + "datasource": { + "uid": "${prometheusds}" + }, + "exemplar": false, + "expr": "openstack_nova_server_local_gb{tenant_id=\"$Project_id\"}", + "format": "table", + "hide": false, + "instant": false, + "interval": "", + "legendFormat": "{{name}}", + "refId": "B" + } + ], + "title": "Servers list", + "transformations": [ + { + "id": "organize", + "options": { + "excludeByName": { + "Time": true, + "Value": true, + "Value #A": true, + "Value #B": false, + "__name__": true, + "flavor_id": true, + "host_id": true, + "id": true, + "instance": true, + "instance_libvirt": true, + "job": true, + "name": false, + "tenant_id": true, + "uuid": false + }, + "indexByName": { + "Time": 5, + "Value": 15, + "__name__": 6, + "availability_zone": 3, + "flavor_id": 7, + "host_id": 8, + "hypervisor_hostname": 9, + "id": 1, + "instance": 10, + "instance_libvirt": 11, + "job": 12, + "name": 2, + "status": 4, + "tenant_id": 13, + "user_id": 14, + "uuid": 0 + }, + "renameByName": { + "Value #B": "Ephemeral Storage(GB)", + "hypervisor_hostname": "host" + } + } + }, + { + "id": "merge", + "options": {} + }, + { + "id": "organize", + "options": { + "excludeByName": {}, + "indexByName": {}, + "renameByName": { + "Value #B": "Ephemeral Storage (GB)" + } + } + } + ], + "type": "table" + } + ], + "refresh": "5m", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "hide": 0, + "includeAll": true, + "label": "Loki datasource", + "multi": true, + "name": "lokids", + "options": [], + "query": "loki", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": "All", + "value": "$__all" + }, + "hide": 0, + "includeAll": true, + "label": "Prometheus datasource", + "multi": true, + "name": "prometheusds", + "options": [], + "query": "prometheus", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "type": "datasource" + }, + { + "current": { + "selected": false, + "text": "cit-network-prod", + "value": "cit-network-prod" + }, + "datasource": { + "uid": "${prometheusds}" + }, + "definition": "openstack_nova_limits_instances_max", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "Project", + "options": [], + "query": { + "query": "openstack_nova_limits_instances_max", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": ".*tenant=\"([^\"]+)\".*", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "current": { + "selected": false, + "text": "d180fa4cc086408bb2251cd80c6bba90", + "value": "d180fa4cc086408bb2251cd80c6bba90" + }, + "datasource": { + "uid": "${prometheusds}" + }, + "definition": "openstack_nova_limits_memory_max{tenant=\"$Project\"}", + "hide": 0, + "includeAll": false, + "multi": false, + "name": "Project_id", + "options": [], + "query": { + "query": "openstack_nova_limits_memory_max{tenant=\"$Project\"}", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": ".*tenant_id=\"([^\"]+)\".*", + "skipUrlSync": false, + "sort": 0, + "tagValuesQuery": "", + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "OpenStack Project Overview", + "uid": "Lul1WzPIz", + "version": 1, + "weekStart": "" +}