Graylog2-server: Graylog 3.x metrics in prometheus format to expose on a specific port directly by the application

Created on 27 Aug 2018  路  7Comments  路  Source: Graylog2/graylog2-server


Kindly could you expose the metrics directly by graylog on a specific port (prometheus format).

Expected Behavior

$ curl localhost:9199/metrics => to have all graylog 3 metrics exposed here.

Context

For monitoring scope it will be great to have this exposed directly by Graylog 3 not to request to Prometheus to create an exporter, InfluxDB already has [[inputs.graylog]] in their collector scope.

Your Environment

  • Graylog Version: 3.x (when will be released)
  • Elasticsearch Version: 6.x
  • MongoDB Version: 3.6.x
  • Operating System: RHEL 7.5
  • Browser version: Google Chrome Version 68.0.3440.106 (Official Build) (64-bit)

Most helpful comment

I can elaborate a bit on why it would be very nice if we had the requested endpoint.
1) It's idiomatically promethean to be able to get the metrics on http://<host>:<port>/metrics, so from a principle of least surprise that's what folks will be looking for.
2) (more importantly), it allows people to have unified scrape configs. For instance, in our setup, most of our applications expose application level prometheus metrics on the same port regardless of the application, meaning we a single, simple scrape config that picks up our applications.

However, for a few applications we do have to set up specialty configs, and it just creates a lot of extra overhead for running services that don't support conforming to our general scheme.

Apologies for re-commenting on a closed issue.

All 7 comments

@fchiorascu There is a metrics plugin that provides a prometheus exporter: https://github.com/graylog-labs/graylog-plugin-metrics-reporter/tree/master/metrics-reporter-prometheus

I hope that helps!

Ok, thank you, I understand this aspect but you don't want to improve this by exposid directly the metrics by graylog on a port, It's the best professional way of doing the things right.

Thank you.
Kind Regards,
Florian

@fchiorascu The prometheus plugin exposes the metrics at http://graylog.example.com:9000/api/plugins/org.graylog.plugins.metrics.prometheus/metrics. Why is that not enough? Please elaborate, thanks!

Hi Bernd,

For me is not clear, and the initial question was if Graylog 3.x will expose the prometheus metrics directly on his localhost:9000/metrics?

Kind Regards,
Florian

@fchiorascu short answer: no

As @bernd already wrote the plugin use the given API and expose http://graylog.example.com:9000/api/plugins/org.graylog.plugins.metrics.prometheus/metrics. If for any reasons this is not working, please elaborate why not.

thx

Thank you, looks ok.

I can elaborate a bit on why it would be very nice if we had the requested endpoint.
1) It's idiomatically promethean to be able to get the metrics on http://<host>:<port>/metrics, so from a principle of least surprise that's what folks will be looking for.
2) (more importantly), it allows people to have unified scrape configs. For instance, in our setup, most of our applications expose application level prometheus metrics on the same port regardless of the application, meaning we a single, simple scrape config that picks up our applications.

However, for a few applications we do have to set up specialty configs, and it just creates a lot of extra overhead for running services that don't support conforming to our general scheme.

Apologies for re-commenting on a closed issue.

Was this page helpful?
0 / 5 - 0 ratings