Skip to content

Commit

Permalink
93: Adds logstash_stats_pipeline_up metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
excalq committed Apr 26, 2023
1 parent 4ec0b0f commit 3627bec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions collectors/nodestats/nodestats_collector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ func TestCollectNotNil(t *testing.T) {
"logstash_stats_jvm_threads_count",
"logstash_stats_jvm_threads_peak_count",
"logstash_stats_jvm_uptime_millis",
"logstash_stats_pipeline_up",
"logstash_stats_pipeline_events_duration",
"logstash_stats_pipeline_events_filtered",
"logstash_stats_pipeline_events_in",
Expand Down
2 changes: 2 additions & 0 deletions collectors/nodestats/pipeline_subcollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ func (collector *PipelineSubcollector) Collect(pipeStats *responses.SinglePipeli
ch <- prometheus.MustNewConstMetric(collector.EventsDuration, prometheus.CounterValue, float64(pipeStats.Events.DurationInMillis), pipelineID)
ch <- prometheus.MustNewConstMetric(collector.EventsQueuePushDuration, prometheus.CounterValue, float64(pipeStats.Events.QueuePushDurationInMillis), pipelineID)

ch <- prometheus.MustNewConstMetric(collector.Up, prometheus.GaugeValue, float64(collector.isPipelineHealthy(pipeStats.Reloads)), pipelineID)

ch <- prometheus.MustNewConstMetric(collector.ReloadsSuccesses, prometheus.CounterValue, float64(pipeStats.Reloads.Successes), pipelineID)
ch <- prometheus.MustNewConstMetric(collector.ReloadsFailures, prometheus.CounterValue, float64(pipeStats.Reloads.Failures), pipelineID)

Expand Down
1 change: 1 addition & 0 deletions scripts/snapshots/metric_names.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ logstash_stats_jvm_mem_non_heap_committed_bytes
logstash_stats_jvm_threads_count
logstash_stats_jvm_threads_peak_count
logstash_stats_jvm_uptime_millis
logstash_stats_pipeline_up
logstash_stats_pipeline_events_duration
logstash_stats_pipeline_events_filtered
logstash_stats_pipeline_events_in
Expand Down

0 comments on commit 3627bec

Please sign in to comment.