All three are useful methods, and you may find using several is the right 
answer for you.

Ultimately it is about collecting the information about what to scrape from the 
sources of truth.

File is the simplest, with information either hard coded or generated by a 
configuration management tool. I find it a useful mechanism for blackbox 
scrapes as well as any services which aren't in AWS.

The AWS method is great for EC2 instances, using tags. Similarly the Consul 
method is great for things registered there - which to use really depends on 
how things are setup for you. You will often find that you might need to adjust 
your service registration in Consul or the tags associated with EC2 instances 
slightly to expose things correctly for Prometheus.

Where we use the EC2 method we have a tag per exporter (e.g. Node, push 
gateway, etc.) and then the scrape config matches based on those, as many boxes 
will need to be scraped on several ports. 

On 22 June 2020 16:07:04 BST, pratyush ranjan <[email protected]> wrote:
>I have three service discovery in my mind for Prometheus those are 
>consul_sd_config, ec2_sd_config & file_sd_config. Which service
>discovery I 
>should choose?
>My monitoring architecture is like I have around 35-40 projects and
>each 
>project has its separate Amazon VPC. Each project has multiple
>instances 
>for elasticsearch , mongodb, redis, MySQL, applications etc.
>My main prometheus.yml file is around 8000+ lines .
>
>-- 
>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/27da3cbe-5562-469c-8bb4-eb17aa24e630o%40googlegroups.com.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

-- 
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/422490AA-ABBD-4A27-A45F-F731F43F58B7%40Jahingo.com.

Reply via email to