Page not found for Prometheus metrics endpoint
AtebMT opened this issue · 3 comments
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:
- Dropped the jar file into the plugin folder
- Restarted Graylog server
- Checked the plugin is listed in the list of loaded plugins
- The graylog server logs reports the following when the plugin is loaded:
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
You need to add configurations to your server.conf
according to the Readme:
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.
@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:
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!