-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
New Plugin: logstash-output-prometheus #11153
Comments
Tagging @andrewvc based on some prior open issues? |
Hey @SpencerMalone. First, thank you for taking the time to create this, and for going the extra mile to follow up with pings when we failed to respond in a timely manner. It's easy for things to get lost in the plugin ecosystem, since there is just a small team of us at @elastic trying to stay on top of the 200+ plugins in the logstash-plugins org (some of which also have excellent external maintainers of their own). We would be glad to help you out with this plugin as we have capacity, and to make it discoverable for those who would benefit from its use. I've taken a look at your implementation, and would be glad to open issues on your repository and to help you chase down solutions, but first I would like to validate some of my own assumptions. I see that if multiple |
Thanks for picking this up! No worries on the timing, I know how it goes. Lemme try to give you some context on the implementation there, as well as some further background for the choice in how the plugin is configured.
is my OG use case. My primary use with this plugin is that we have a great internal pipeline for our nginx data from filebeat -> kafka -> logstash -> es, and I wanted to hop into that and add an extra set of logstash instances that are going kafka -> logstash -> prometheus easily. We set it up on our instances so that we essentially have two prometheus registries:
I wanted to avoid a unique port per logstash pipeline output requirement because it can be kind of a PITA to tell prometheus to scrape lots of ports from a single service, and while that is a configuration management problem, it felt to me like enough of a problem that it was worth offering an easy sidestep from within the plugin. I also tried to build the configuration API to feel similar to the statsd output plugin, as we were previously using the statsd output plugin -> https://github.com/prometheus/statsd_exporter -> prometheus. |
@SpencerMalone I'm going to ruminate on this and circle back later in the week. From what I can tell, there are a number of ways we'll need to improve the plugin to make it able to handle features like pipeline reloading, pipeline shutdowns etc., and we should make it more resilient to clashes in metrics (e.g., same metric defined in two different outputs currently will crash the pipeline with the second output). It's also susceptible to race conditions in its current form where two pipelines pointing to the same port are started simultaneously, which can be worked around fairly easily. I'll futz around with it as a "back burner" project this week and get back to you. |
Do you have a metrics screenshot? Thanks, |
This is about exposing arbitrary data received by Logstash, which I think is what you want. |
Hi |
@SpencerMalone @yaauie is there still interest in developing this plug-in? |
I've not heard anything, in subsequent years I moved away from this pattern, although it was nice in the transition period. Nowadays I mostly rely on mtail for unstructured logging, or writing my own exporter that parses different log files for structured logging (in the rare circumstances that I need metrics retrievable only from logging). I'm happy to hand over the maintainer flag if you have goals that involve this. |
Hey folks! I'm making this issue based on the guidelines in the logstash docs, although some of the chatter on other issues made it sound like there might be a newer method to do so? If that new method is public, feel free to redirect me there.
Anyways, I have a simple output plugin over @ https://github.com/SpencerMalone/logstash-output-prometheus which outputs data to an instance of https://github.com/prometheus/client_ruby run by the plugin. This is slightly different from your average logstash output plugin because it is serving a new page that a Prometheus instance (or instances) can then scrape. I chose to go this route instead of relying on the Pushgateway (a Prometheus feature which lets you use the more traditional push model) because of the caveats and use cases mentioned at https://prometheus.io/docs/practices/pushing/
Lemme know what feedback you have, or what the next steps should be!
The text was updated successfully, but these errors were encountered: