Add "flavor" label to uniquely identify metrics
Sometime during instance resizing, nova will create a new instance on different host with the same uuid and instance name, and this will cause some query failed on "many-to-many matching not allowed: matching labels must be unique on one side". Adding extra "flavor" label might help resolving the uniqueness of metrics during resizing. See issue: https://github.com/canonical/openstack-exporter-operator/issues/120 Change-Id: I49dcd22c90dacb52952461f37a043b48912d5e01
This commit is contained in:
parent
c802e94024
commit
ed96973390
@ -840,7 +840,7 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "rate(libvirt_domain_info_cpu_time_seconds_total[$__rate_interval]) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "rate(libvirt_domain_info_cpu_time_seconds_total[$__rate_interval]) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"format": "table",
|
"format": "table",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": true,
|
"instant": true,
|
||||||
@ -849,7 +849,7 @@
|
|||||||
"refId": "cpu_time"
|
"refId": "cpu_time"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "libvirt_domain_info_memory_usage_bytes * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "libvirt_domain_info_memory_usage_bytes * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"format": "table",
|
"format": "table",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": true,
|
"instant": true,
|
||||||
@ -858,7 +858,7 @@
|
|||||||
"refId": "mem_usage"
|
"refId": "mem_usage"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_bytes_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_bytes_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_bytes_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_bytes_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"format": "table",
|
"format": "table",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": true,
|
"instant": true,
|
||||||
@ -867,7 +867,7 @@
|
|||||||
"refId": "net_throughput"
|
"refId": "net_throughput"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_packets_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_packets_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_packets_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_packets_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"format": "table",
|
"format": "table",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": true,
|
"instant": true,
|
||||||
@ -876,7 +876,7 @@
|
|||||||
"refId": "packets_rate"
|
"refId": "packets_rate"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_errors_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_errors_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_errors_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_errors_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"format": "table",
|
"format": "table",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": true,
|
"instant": true,
|
||||||
@ -885,7 +885,7 @@
|
|||||||
"refId": "net_errors"
|
"refId": "net_errors"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_drops_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_drops_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_drops_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_drops_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"format": "table",
|
"format": "table",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": true,
|
"instant": true,
|
||||||
@ -894,7 +894,7 @@
|
|||||||
"refId": "packets_drops"
|
"refId": "packets_drops"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_read_requests_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_write_requests_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_read_requests_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_write_requests_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"format": "table",
|
"format": "table",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": true,
|
"instant": true,
|
||||||
@ -903,7 +903,7 @@
|
|||||||
"refId": "disks_iops"
|
"refId": "disks_iops"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_read_bytes_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_write_bytes_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "(sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_read_bytes_total[$__rate_interval])) + sum by(juju_unit, domain) (rate(libvirt_domain_block_stats_write_bytes_total[$__rate_interval]))) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"format": "table",
|
"format": "table",
|
||||||
"hide": false,
|
"hide": false,
|
||||||
"instant": true,
|
"instant": true,
|
||||||
@ -1043,7 +1043,7 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "rate(libvirt_domain_info_cpu_time_seconds_total[$__rate_interval]) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "rate(libvirt_domain_info_cpu_time_seconds_total[$__rate_interval]) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -1247,7 +1247,7 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "libvirt_domain_info_memory_usage_bytes * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "libvirt_domain_info_memory_usage_bytes * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -1372,7 +1372,7 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "libvirt_domain_info_maximum_memory_bytes * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "libvirt_domain_info_maximum_memory_bytes * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"format": "table",
|
"format": "table",
|
||||||
"instant": true,
|
"instant": true,
|
||||||
"interval": "",
|
"interval": "",
|
||||||
@ -1502,13 +1502,13 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_bytes_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_bytes_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "rx: {{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "rx: {{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_bytes_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_bytes_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "tx: {{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "tx: {{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "B"
|
"refId": "B"
|
||||||
@ -1598,13 +1598,13 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_packets_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_packets_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "rx: {{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "rx: {{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_packets_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_packets_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "tx: {{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "tx: {{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "B"
|
"refId": "B"
|
||||||
@ -1889,25 +1889,25 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_errors_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_errors_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "rx err: {{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "rx err: {{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_errors_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_errors_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "tx err: {{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "tx err: {{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "B"
|
"refId": "B"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_drops_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_receive_drops_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "rx drop: {{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "rx drop: {{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "C"
|
"refId": "C"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_drops_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain) (rate(libvirt_domain_interface_stats_transmit_drops_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "tx drop: {{project_name}} | {{instance_name}} | {{uuid}}",
|
"legendFormat": "tx drop: {{project_name}} | {{instance_name}} | {{uuid}}",
|
||||||
"refId": "D"
|
"refId": "D"
|
||||||
@ -2020,7 +2020,7 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_read_requests_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_read_requests_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}",
|
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -2110,7 +2110,7 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_write_requests_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_write_requests_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}",
|
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -2200,7 +2200,7 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_read_bytes_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_read_bytes_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}",
|
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
@ -2290,7 +2290,7 @@
|
|||||||
"pluginVersion": "9.2.1",
|
"pluginVersion": "9.2.1",
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_write_bytes_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
"expr": "sum by(juju_unit, domain, target_device) (rate(libvirt_domain_block_stats_write_bytes_total[$__rate_interval])) * on(juju_unit, domain) group_left(project_name, instance_name, uuid, flavor) libvirt_domain_info_meta{project_name=~\"$project\"}",
|
||||||
"interval": "",
|
"interval": "",
|
||||||
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}",
|
"legendFormat": "{{project_name}} | {{instance_name}} | {{uuid}} | {{target_device}}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
|
Loading…
Reference in New Issue
Block a user