Skip to content

Commit

Permalink
Replace instance to juju_unit for the metric joins (#377)
Browse files Browse the repository at this point in the history
  • Loading branch information
Deezzir authored Dec 13, 2024
1 parent d7d6c32 commit a6e9391
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions src/grafana_dashboards/smart.json
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,7 @@
"targets": [
{
"editorMode": "code",
"expr": "smartctl_device_attribute{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\", job=\"$job\"}",
"expr": "smartctl_device_attribute{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\", job=\"$job\"}",
"range": false,
"instant": true,
"format": "table",
Expand Down Expand Up @@ -961,7 +961,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_temperature{instance=~\"$instance\", job=\"$job\",temperature_type=\"current\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_temperature{instance=~\"$instance\", job=\"$job\",temperature_type=\"current\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1046,7 +1046,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_smartctl_exit_status{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_smartctl_exit_status{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1131,7 +1131,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_smart_status{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_smart_status{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1216,7 +1216,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (increase(smartctl_device_power_on_seconds{instance=~\"$instance\", job=\"$job\"}[1h]) * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (increase(smartctl_device_power_on_seconds{instance=~\"$instance\", job=\"$job\"}[1h]) * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1301,7 +1301,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_power_cycle_count{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_power_cycle_count{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1386,7 +1386,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_percentage_used{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_percentage_used{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1471,7 +1471,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_nvme_capacity_bytes{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_nvme_capacity_bytes{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1556,7 +1556,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_num_err_log_entries{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_num_err_log_entries{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1642,7 +1642,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_media_errors{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_media_errors{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1728,7 +1728,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_error_log_count{instance=~\"$instance\", job=\"$job\",error_log_type=\"summary\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_error_log_count{instance=~\"$instance\", job=\"$job\",error_log_type=\"summary\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1813,7 +1813,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_critical_warning{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_critical_warning{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1898,7 +1898,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_interface_speed{instance=~\"$instance\", job=\"$job\",speed_type=\"current\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_interface_speed{instance=~\"$instance\", job=\"$job\",speed_type=\"current\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -1983,7 +1983,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_interface_speed{instance=~\"$instance\", job=\"$job\",speed_type=\"max\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_interface_speed{instance=~\"$instance\", job=\"$job\",speed_type=\"max\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -2068,7 +2068,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_capacity_bytes{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_capacity_bytes{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -2153,7 +2153,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_capacity_blocks{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_capacity_blocks{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -2238,7 +2238,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_bytes_written{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_bytes_written{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -2323,7 +2323,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_bytes_read{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_bytes_read{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -2408,7 +2408,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_block_size{instance=~\"$instance\", job=\"$job\",blocks_type=\"logical\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_block_size{instance=~\"$instance\", job=\"$job\",blocks_type=\"logical\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -2493,7 +2493,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_block_size{instance=~\"$instance\", job=\"$job\",blocks_type=\"physical\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_block_size{instance=~\"$instance\", job=\"$job\",blocks_type=\"physical\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -2578,7 +2578,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_available_spare_threshold{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_available_spare_threshold{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down Expand Up @@ -2664,7 +2664,7 @@
"targets": [
{
"editorMode": "code",
"expr": "sum by (model_name) (smartctl_device_available_spare{instance=~\"$instance\", job=\"$job\"} * on(device, instance) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"expr": "sum by (model_name) (smartctl_device_available_spare{instance=~\"$instance\", job=\"$job\"} * on(device, juju_unit) group_left(model_name) smartctl_device{instance=~\"$instance\"})",
"legendFormat": "{{ model_name }}",
"range": true,
"instant": false,
Expand Down

0 comments on commit a6e9391

Please sign in to comment.