Skip to content

Commit

Permalink
Fix metric per scope
Browse files Browse the repository at this point in the history
  • Loading branch information
ramyahasini authored and paskal committed May 14, 2020
1 parent dfaf39f commit afe7983
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/graphite.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (m *Metrics) RecordByInstalledHost() {
metricNameByHost := fmt.Sprintf("installed.by_host.%s.count.hourly", quote(m.Hostname))
goMetrics.GetOrRegisterGauge(metricNameByHost, m.EveryHourRegister).Update(int64(1))
if m.RoleName != "" {
metricNameByRole := fmt.Sprintf("installed.by_role.%s.count.hourly", quote(m.RoleName))
metricNameByRole := fmt.Sprintf("installed.by_role.%s.%s.count.hourly", quote(m.RoleName), quote(m.Hostname))
goMetrics.GetOrRegisterGauge(metricNameByRole, m.EveryHourRegister).Update(int64(1))
}
}
Expand Down

0 comments on commit afe7983

Please sign in to comment.