Well a way to avoid these questions would be to use first an absolute path.

At least it will help you to understand why Prometheus doesn't find your
file.

Le sam. 18 avr. 2020 à 09:54, Brian Candler <[email protected]> a écrit :

> On Saturday, 18 April 2020 01:15:12 UTC+1, Augustin Husson wrote:
>>
>> check that the alertRule file is in the same directory than the
>> prometheus binary.
>>
>>
> If you use relative paths, I believe they are relative to the directory
> containing the prometheus.yml file (not the directory containing the
> binary, nor the cwd)
>
> I have:
>
> /opt/prometheus/prometheus  # the binary
>
> /etc/systemd/system/prometheus.service
> ...
> WorkingDirectory=/opt/prometheus
>
>> /etc/prometheus/prometheus.yml
> ...
> rule_files:
>   - "rules/*.yml"
>
> /etc/prometheus/rules/whatever.yml
>
> --
> 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/0dd8287e-70c5-408a-927c-4202996ced63%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/0dd8287e-70c5-408a-927c-4202996ced63%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAOJizGfM9E%3DUO04H9v1XYoULAPUTTQNEPGEpzxG8Oe_acccKAw%40mail.gmail.com.

Reply via email to