-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unified Pipeline/output metrics #4663
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great change. It heavily simplifies the internal and external handling of the metrics. Makes it very easy to filter by one output type etc.
Makes we wonder, if there are other places where we should do the same ;-)
next := math.Float64bits(math.Float64frombits(cur) + delta) | ||
if atomic.CompareAndSwapUint64(&v.f, cur, next) { | ||
if v.f.CAS(cur, next) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tricky abbreviation. only know what it means because of the diff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh... to me CAS on atomics is pretty well known/common :)
@urso The wait_shutdown_ok test seems to fail, which worries me a bit. But not related to this PR I think. |
@ruflin checked the test. The test is completely unrelated to this PR. Although the test is failing (cause the shutdown timer times out), I verified the state in the registry still matches expectations. |
- use libbeat/common/atomic package - add monitoring.Uint type
- report pipeline metrics on: - libbeat.pipeline.... - xpack.monitoring.pipeline...
This PR adds metrics support to the publisher pipeline + unifies the metrics used by outputs.
The metrics are registered dynamically and can be removed later on (e.g. pipeline already removes metrics after on close).
Metrics support is somewhat standardised and decoupled from outputs/publisher pipeline, by having some kind of event listener/observer/... object defining a set of common events. On every event from the outputs, the metrics (potentially multiple metrics) are updated accordingly.
The original per output type metrics have been removed (no more
output.elasticsearch...
and so on), in favor of a standardized set of metrics.The observer is passed to the outputs and publisher pipeline. This is used to collect metrics for different pipeline instances (
xpack
andlibbeat
namespace).pipeline metrics:
pipeline.clients
: number of beat.Client instances (internal connections to pipeline)pipeline.events.total
: total number of events processed by a clientpipeline.events.filtered
: total number of events removed by processorspipeline.events.published
: total number of events pushed to the queue/brokerpipeline.events.failed
: total number of events failed to be pushed to queue (e.g. disconnect)pipeline.events.dropped
: total number of events droppedpipeline.events.retry
: total number of events retriedpipeline.queue.acked
: total number of events ACKed by the event queue/bufferpipeline.events.active
: (gauge) number of active events in pipelineoutput metrics:
output.type
: configured output type (logstash, elasticsearch, ...)output.events.batches
: total number of batches processed by outputoutput.events.total
: total number of events processed by outputoutput.events.acked
: total number of events ACKed by outputoutput.events.failed
: total number of events failed in outputoutput.events.active
: (gauge) events sent and waiting for ACK/fail from outputoutput.write.bytes
: total amount of bytes written by outputoutput.write.errors
: total number of I/O errors on writeoutput.read.bytes
: total amount of bytes readoutput.read.errors
: total number of I/O errors while waiting for response on output