Skip to content

Commit

Permalink
Fix a graph definition for Apache Solr's cumulative metric
Browse files Browse the repository at this point in the history
  • Loading branch information
supercaracal committed Aug 1, 2017
1 parent ad563cc commit 12d73ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mackerel-plugin-solr/lib/solr.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,12 @@ func (s SolrPlugin) GraphDefinition() map[string]mp.Graphs {
for _, path := range handlerPaths {
path = escapeSlash(path)
metricLabel := strings.Title(path)
diff := false
if key == "requests" {
diff = true
}
metrics = append(metrics,
mp.Metrics{Name: fmt.Sprintf("%s_%s_%s", core, key, path), Label: metricLabel},
mp.Metrics{Name: fmt.Sprintf("%s_%s_%s", core, key, path), Label: metricLabel, Diff: diff},
)
}
unit := "float"
Expand Down

0 comments on commit 12d73ca

Please sign in to comment.