From 1e008d2c359725f6496ca70cf07a5bf564ba84b4 Mon Sep 17 00:00:00 2001 From: Hang Du Date: Tue, 25 Sep 2018 22:30:55 -0700 Subject: [PATCH] Update filebeat.go --- collector/filebeat.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/collector/filebeat.go b/collector/filebeat.go index d76e2b6..ee04b6d 100644 --- a/collector/filebeat.go +++ b/collector/filebeat.go @@ -20,7 +20,7 @@ type Filebeat struct { Started float64 `json:"started"` } `json:"harvester"` - Prospector struct { + Input struct { Log struct { Files struct { Renamed float64 `json:"renamed"` @@ -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, }, },