Skip to content

Commit

Permalink
Rename instance ID key from host to vm_instance (#63)
Browse files Browse the repository at this point in the history
* adjust instance label name
* fix unit tests
Resolves: rhbz#1979637
  • Loading branch information
pleimer authored Jul 6, 2021
1 parent 5755a97 commit c9aac76
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion plugins/handler/ceilometer-metrics/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ func genLabels(m ceilometer.Metric, publisher string, cNameShards []string) ([]s
}

if m.ResourceMetadata.Host != "" {
labelKeys[index] = "host"
labelKeys[index] = "vm_instance"
labelVals[index] = m.ResourceMetadata.Host
index++
}
Expand Down
12 changes: 6 additions & 6 deletions plugins/handler/ceilometer-metrics/messages/metric-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"project",
"unit",
"resource",
"host"
"vm_instance"
],
"LabelVals": [
"size",
Expand All @@ -46,7 +46,7 @@
"project",
"unit",
"resource",
"host"
"vm_instance"
],
"LabelVals": [
"size",
Expand All @@ -73,7 +73,7 @@
"project",
"unit",
"resource",
"host"
"vm_instance"
],
"LabelVals": [
"booting",
Expand All @@ -100,7 +100,7 @@
"project",
"unit",
"resource",
"host"
"vm_instance"
],
"LabelVals": [
"d8bd99b6-6fd8-4c02-a2e3-efbf596df636",
Expand All @@ -127,7 +127,7 @@
"project",
"unit",
"resource",
"host"
"vm_instance"
],
"LabelVals": [
"d8bd99b6-6fd8-4c02-a2e3-efbf596df636",
Expand All @@ -146,4 +146,4 @@
}
]
}
}
}

0 comments on commit c9aac76

Please sign in to comment.