Skip to content

Commit

Permalink
Restore field name case in interrupts input (influxdata#5850)
Browse files Browse the repository at this point in the history
  • Loading branch information
glinton authored and danielnelson committed May 14, 2019
1 parent 74948ed commit 2d44a88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugins/inputs/interrupts/interrupts.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func gatherTagsFields(irq IRQ) (map[string]string, map[string]interface{}) {
tags := map[string]string{"irq": irq.ID, "type": irq.Type, "device": irq.Device}
fields := map[string]interface{}{"total": irq.Total}
for i := 0; i < len(irq.Cpus); i++ {
cpu := fmt.Sprintf("cpu%d", i)
cpu := fmt.Sprintf("CPU%d", i)
fields[cpu] = irq.Cpus[i]
}
return tags, fields
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/interrupts/interrupts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func expectCpuAsFields(m *testutil.Accumulator, t *testing.T, measurement string
fields := map[string]interface{}{}
total := int64(0)
for idx, count := range irq.Cpus {
fields[fmt.Sprintf("cpu%d", idx)] = count
fields[fmt.Sprintf("CPU%d", idx)] = count
total += count
}
fields["total"] = total
Expand Down

0 comments on commit 2d44a88

Please sign in to comment.