Prometheus fails to scrap itself when run with web.external-url param

27 views
Skip to first unread message

Dmitry Kundo

unread,
Jun 30, 2021, 10:14:02 AM6/30/21
to Prometheus Users
Hi,

I'm running prometheus with --web.external-url=https://prom.myorg.com/abcd/ .
For some reason it fails to scrap itself. 
Running curl localhost:9090 gives me
<a href="/abcd">Found</a>.

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets:
        - 'localhost:9090'

What am I doing wrong?

Thanks

Julien Pivotto

unread,
Jun 30, 2021, 10:25:55 AM6/30/21
to Dmitry Kundo, Prometheus Users
On 30 Jun 17:13, Dmitry Kundo wrote:
> Hi,
>
> I'm running prometheus with *--web.external-url=https://prom.myorg.com/abcd/
> <https://prom.myorg.com/abcd/>* .
> For some reason it fails to scrap itself.
> Running curl localhost:9090 gives me
> <a href="/abcd">Found</a>.
>
> scrape_configs:
> - job_name: 'prometheus'
> static_configs:
> - targets:

Hello,

You could set --web.route-prefix=/ and adapt your reverse proxy
accordingdly, or set metrics_path: /abcd/metrics in the scrape config.


> - 'localhost:9090'
>
> What am I doing wrong?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CADxb1xW%2BcM_h-Ru0JtgtiJyOrs0jaavxVRkTQ2MmVRjeOXSeEg%40mail.gmail.com.

--
Julien Pivotto
@roidelapluie
Reply all
Reply to author
Forward
0 new messages