prometheus federate transfter alerts stopped to main prometheus

182 views
Skip to first unread message

Prashant Singh

unread,
Nov 22, 2022, 12:53:57 AM11/22/22
to Prometheus Users
Dear All,

I am using federate prometheus and configured to central prometheus . but getting alerts from federate prometheus also . how can avoids alerts from federate.


  - job_name: 'K8S-Federate'
    #scrape_interval: 15s
    honor_labels: true
    metrics_path: '/federate'
    scheme      : http

    params:
      'match[]':
       - '{job!=""}'


thanks,
prashant 

Stuart Clark

unread,
Nov 22, 2022, 2:11:42 AM11/22/22
to Prashant Singh, Prometheus Users
The alert rules are set in each Prometheus, so if you are not wanting
them you'd need to look at the configuration and change/remove.

--
Stuart Clark

Prashant Singh

unread,
Nov 22, 2022, 4:44:33 AM11/22/22
to Stuart Clark, Prometheus Users
It is possible to alert get from federate prometheus to central prometheus or only metrics get?

Brian Candler

unread,
Nov 22, 2022, 5:12:59 AM11/22/22
to Prometheus Users
Federation is just scraping: the central prometheus server scrapes the other's /federate endpoint.

Scraping only collects metrics.

Alerts are completely separate:
- alerting rules are evaluated periodically inside the prometheus server
- if they are triggered, then alerts are *pushed* out to alertmanager (this is not scraping).

If you want to duplicate this centrally, then you'll need to duplicate the alerting rules on the central server.  But why would you want to?  The alerts are already coming from the remote prometheus servers, which can be configured to send them to a central alertmanager (which can be a cluster).

If the problem you are trying to solve is what happens when the remote prometheus servers lose connectivity (and hence can't deliver alerts), then you won't be able to scrape the federation endpoint either.
Reply all
Reply to author
Forward
0 new messages