Hello Brian,

Thank you very much, it is working properly now :) 

Have a nice day,
Damian

wtorek, 13 czerwca 2023 o 15:34:27 UTC+2 Brian Candler napisaƂ(a):

> 1. You have to configure your alertmanager to listen on /my/path
> 2. I believe you need the leading slash.
>
> Here are some working configs taken straight off my system, where the 
> alertmanager path prefix is "/alertmanager"
>
> For alertmanager itself, run with this flag:
>
> alertmanager ... --web.external-url=
> http://prometheus.mydomain.com:9093/alertmanager
>
> (You can test this using "curl localhost:9093/alertmanager/metrics")
>
> For prometheus:
>
> alerting:
>   alertmanagers:
>   - scheme: http
>     path_prefix: /alertmanager
>     static_configs:
>       - targets:
>           - "127.0.0.1:9093"
>
> scrape_configs:
>   - job_name: alertmanager
>     scrape_interval: 1m
>     metrics_path: /alertmanager/metrics
>     static_configs:
>       - targets: ['localhost:9093']
>
> On Tuesday, 13 June 2023 at 13:49:52 UTC+1 Damian wrote:
>
>> Hello!
>>
>> I want to send my alerts to alertmanager with path_prefix. It's working 
>> properly without path_prefix. But when I try add path_prefix, the page show 
>> me "404 page not found". My prometheus version is 2.12.0 and alertmanager 
>> is 0.25.0. I've tried a few options. What should I do wrong? Maybe versions 
>> are not compatible? My alerting section in prometheus.yaml:
>>
>> alerting:
>>   alertmanagers:
>>   - path_prefix: "my/path/"
>>     static_configs:
>>     - targets:
>>       - localhost:9093
>>
>> When I'm trying localhost:9093/my/path I see "404 page not found".
>>
>> I also tried on my virtual machine with prometheus version 2.32.1 and 
>> alertmanager version 0.23.0 and have the same issue.
>>
>> Thank you in advance for hints.
>>
>> Regards,
>> Damian
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/6655e897-c95b-41c6-9b7b-d182ae1823e4n%40googlegroups.com.

Reply via email to