graylog-labs / graylog-plugin-metrics-reporter

Graylog Metrics Reporter Plugins
https://www.graylog.org/
GNU General Public License v3.0
80 stars 18 forks source link

Page not found for Prometheus metrics endpoint #32

Closed AtebMT closed 5 years ago

AtebMT commented 5 years ago

I guess I'm missing something blindly obvious here, but I just can't get the Prometheus reporter to generate the metrics endpoint.

I've done the following:

2019-02-05 11:31:08,905 INFO : org.graylog2.bootstrap.CmdLineTool - Loaded plugin: Internal Metrics Prometheus Reporter 2.4.0-beta.3 [org.graylog.plugins.metrics.prometheus.MetricsPrometheusReporterMetaData]
2019-02-05 11:31:14,830 INFO : org.graylog2.shared.initializers.PeriodicalsService - Not starting [org.graylog.plugins.metrics.prometheus.PushGatewayPeriodical] periodical. Not configured to run on this node.

Everything looks OK, but when I visit http://my-graylog.com:9000/api/plugins/org.graylog.plugins.metrics.prometheus/metrics all we see is Page not found message and a nice picture of a Gorilla with a banana.

What gives? Searching the Graylog server logs reveals nothing that indicates any problem.

Any suggestions on where to look next in order to diagnose further? We are using Graylog v2.4.0+2115a42, codename Wildwuchs.

Mike

jalogisch commented 5 years ago

You need to add configurations to your server.conf according to the Readme:

https://github.com/graylog-labs/graylog-plugin-metrics-reporter/tree/master/metrics-reporter-prometheus

AtebMT commented 5 years ago

Well, I take it you mean changes the Prometheus configuration file (prometheus.yml) rather than server.conf, since there is no reference to server.conf on that page?

Either way, that still doesn't work. The problem isn't Prometheus, it's the exposed /metrics endpoint on the Graylog server. A simple browser request to that endpoint returns the Page not found message. (And, a 200 status code rather than a 404 as well just to add to the overall confusion.) It's Graylog that's the issue here, not Prometheus.

bernd commented 5 years ago

@AtebMT I am unable to reproduce your issue with a Graylog 3.x setup. Accessing the prometheus API endpoint via curl and the browser works fine:

image

If this is still relevant, please re-open the issue with some more details about your setup. (especially server logs) Make sure to update to the latest stable release (3.0.2 as of this writing).

Thank you!