Skip to content

Commit

Permalink
[logstash/node_stats] Parity with internally-collected fields (#12989)
Browse files Browse the repository at this point in the history
* Fix collection of logstash_stats.events and logstash_stats.pipelines.events fields

* Fix collection of logstash_stats.jvm.uptime_in_millis field

* Fixing typo

* Removing logstash_stats.events.queue_push_duration_in_millis field
  • Loading branch information
ycombinator authored Jul 25, 2019
1 parent 91c0a08 commit d5b8171
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions metricbeat/module/logstash/node_stats/data_xpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,17 @@ type jvm struct {
HeapUsedInBytes int `json:"heap_used_in_bytes"`
HeapUsedPercent int `json:"heap_used_percent"`
} `json:"mem"`
UptimeInMillis int `json:"uptime_in_millis"`
}

type events struct {
In int `json:"in"`
Filtered int `json:"filtered"`
Out int `json:"out"`
}

type commonStats struct {
Events map[string]interface{} `json:"events"`
Events events `json:"events"`
JVM jvm `json:"jvm"`
Reloads map[string]interface{} `json:"reloads"`
Queue struct {
Expand Down Expand Up @@ -93,13 +100,6 @@ type reloads struct {
Failures int `json:"failures"`
}

type events struct {
DurationInMillis int `json:"duration_in_millis"`
In int `json:"in"`
Filtered int `json:"filtered"`
Out int `json:"out"`
}

// NodeStats represents the stats of a Logstash node
type NodeStats struct {
nodeInfo
Expand All @@ -124,7 +124,7 @@ type PipelineStats struct {
ID string `json:"id"`
Hash string `json:"hash"`
EphemeralID string `json:"ephemeral_id"`
Events events `json:"events"`
Events map[string]interface{} `json:"events"`
Reloads reloads `json:"reloads"`
Queue map[string]interface{} `json:"queue"`
Vertices []map[string]interface{} `json:"vertices"`
Expand Down

0 comments on commit d5b8171

Please sign in to comment.