diff --git a/collector/filebeat.go b/collector/filebeat.go index 7c58fa0..ee04b6d 100644 --- a/collector/filebeat.go +++ b/collector/filebeat.go @@ -20,14 +20,14 @@ type Filebeat struct { Started float64 `json:"started"` } `json:"harvester"` - Prospector struct { + Input struct { Log struct { Files struct { Renamed float64 `json:"renamed"` Truncated float64 `json:"truncated"` } `json:"files"` } `json:"log"` - } `json:"prospector"` + } `json:"input"` } type filebeatCollector struct { @@ -116,20 +116,20 @@ func NewFilebeatCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector }, { desc: prometheus.NewDesc( - prometheus.BuildFQName(beatInfo.Beat, "filebeat", "prospector_log"), - "filebeat.prospector_log", + prometheus.BuildFQName(beatInfo.Beat, "filebeat", "input_log"), + "filebeat.input_log", nil, prometheus.Labels{"files": "renamed"}, ), - eval: func(stats *Stats) float64 { return stats.Filebeat.Prospector.Log.Files.Renamed }, + eval: func(stats *Stats) float64 { return stats.Filebeat.Input.Log.Files.Renamed }, valType: prometheus.UntypedValue, }, { desc: prometheus.NewDesc( - prometheus.BuildFQName(beatInfo.Beat, "filebeat", "prospector_log"), - "filebeat.prospector_log", + prometheus.BuildFQName(beatInfo.Beat, "filebeat", "input_log"), + "filebeat.input_log", nil, prometheus.Labels{"files": "truncated"}, ), - eval: func(stats *Stats) float64 { return stats.Filebeat.Prospector.Log.Files.Truncated }, + eval: func(stats *Stats) float64 { return stats.Filebeat.Input.Log.Files.Truncated }, valType: prometheus.UntypedValue, }, }, diff --git a/collector/system.go b/collector/system.go index 4afddb1..490a641 100644 --- a/collector/system.go +++ b/collector/system.go @@ -45,7 +45,7 @@ func NewSystemCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector { { desc: prometheus.NewDesc( prometheus.BuildFQName(beatInfo.Beat, "system", "load"), - "system load 1m", + "system load", nil, prometheus.Labels{"period": "1"}, ), eval: func(stats *Stats) float64 { return stats.System.Load.M1 }, @@ -54,7 +54,7 @@ func NewSystemCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector { { desc: prometheus.NewDesc( prometheus.BuildFQName(beatInfo.Beat, "system", "load"), - "system load 1m", + "system load", nil, prometheus.Labels{"period": "5"}, ), eval: func(stats *Stats) float64 { return stats.System.Load.M5 }, @@ -63,7 +63,7 @@ func NewSystemCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector { { desc: prometheus.NewDesc( prometheus.BuildFQName(beatInfo.Beat, "system", "load"), - "system load 1m", + "system load", nil, prometheus.Labels{"period": "15"}, ), eval: func(stats *Stats) float64 { return stats.System.Load.M15 }, @@ -72,7 +72,7 @@ func NewSystemCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector { { desc: prometheus.NewDesc( prometheus.BuildFQName(beatInfo.Beat, "system_load", "norm"), - "system load 1m", + "system load", nil, prometheus.Labels{"period": "1"}, ), eval: func(stats *Stats) float64 { return stats.System.Load.Norm.M1 }, @@ -81,7 +81,7 @@ func NewSystemCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector { { desc: prometheus.NewDesc( prometheus.BuildFQName(beatInfo.Beat, "system_load", "norm"), - "system load 1m", + "system load", nil, prometheus.Labels{"period": "5"}, ), eval: func(stats *Stats) float64 { return stats.System.Load.Norm.M5 }, @@ -90,7 +90,7 @@ func NewSystemCollector(beatInfo *BeatInfo, stats *Stats) prometheus.Collector { { desc: prometheus.NewDesc( prometheus.BuildFQName(beatInfo.Beat, "system_load", "norm"), - "system load 1m", + "system load", nil, prometheus.Labels{"period": "15"}, ), eval: func(stats *Stats) float64 { return stats.System.Load.Norm.M15 },