Hello,

I guess that's because prometheus doesn't find the file.
It's quite a weird extension you have here. Why did you put ".rules"
instead of .yaml ?
Maybe it's coming from there. And looking at the path you put, check that
the alertRule file is in the same directory than the prometheus binary.

Cheers,
Augustin.

Le sam. 18 avr. 2020 à 00:24, 'Derek Lai' via Prometheus Users <
[email protected]> a écrit :

> Hi
>
> We are evaluating using Prometheus v. 2.15.2. Here's my prometheus.yml:
>
> global:
>   scrape_interval: 15s # By default, scrape targets every 15 seconds.
>   evaluation_interval: 15s # By default, scrape targets every 15 seconds.
>   external_labels:
>     monitor: "example"
>
> rule_files:
>   - "alert.rules"
>
> alerting:
>   alertmanagers:
>   - static_configs:
>     - targets:
>       - 'localhost:9093'
>
> scrape_configs:
>   - job_name: "prometheus"
>     scrape_interval: 5s
>     scrape_timeout: 5s
>
>     static_configs:
>       - targets:
>         - localhost:9090
>
>   - job_name: node
>     static_configs:
>       - targets:
>          - localhost:9100
>
> Here's the alert rule file, alert.rules:
> groups:
> - name: alert.rules
>   rules:
>   - alert: InstanceDown
>     expr: up == 0
>     for: 1m
>     labels:
>       severity: "critical"
>     annotations:
>       summary: "Endpoint {{ $labels.instance }} down"
>       description: "{{ $labels.instance }} of job {{ $labels.job }} has
> been down for more than 1 minutes."
>
> I've ran promtool check rule on this rule file and it passes. Looking thru
> docker log:
>
> level=info ts=2020-04-17T21:36:28.087Z caller=main.go:734 msg="Loading
> configuration file" filename=/etc/prometheus/prometheus.yml
> ....
> level=info ts=2020-04-17T21:36:28.092Z caller=main.go:762 msg="Completed
> loading of configuration file" filename=/etc/prometheus/prometheus.yml
> level=info ts=2020-04-17T21:36:28.092Z caller=main.go:617 msg="Server is
> ready to receive web requests."
>
> but in the UI under Rules it says: "No rules defined". How can I go about
> troubleshooting what is wrong?
>
>
> Thanks,
>
> Derek
>
>
> _____________________________________________________________
> The information contained in this communication is intended solely for the
> use of the individual or entity to whom it is addressed and others
> authorized to receive it. It may contain confidential or legally privileged
> information. If you are not the intended recipient you are hereby notified
> that any disclosure, copying, distribution or taking any action in reliance
> on the contents of this information is strictly prohibited and may be
> unlawful. If you have received this communication in error, please notify
> us immediately by responding to this email and then delete it from your
> system. The firm is neither liable for the proper and complete transmission
> of the information contained in this communication nor for any delay in its
> receipt.
>
> --
> 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/74b9a4f7-d327-47c7-ae01-a9b14f15e849%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/74b9a4f7-d327-47c7-ae01-a9b14f15e849%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/CAOJizGcsikbPf_cwSo3mznFk8KMdu3aZrh1YAm5UspVHsR%3DcMw%40mail.gmail.com.

Reply via email to