On 31 Jan 16:04, srini_at_work wrote:
> in-short we are doing this now, to trace the metrics from two different
> exporters from same account:
> Only the difference in both job configurations are - port numbers. Can we
> have multiple ports defined in same job usinng ec2_sd_configs?
hello,
You should reuse ec2_sd_configs, so that you reduce the api
calls, as prometheus will reuse it.
- job_name: test-exporter-1
metrics_path: /metrics
scheme: http
ec2_sd_configs: &ec2config
- endpoint: ""
region: ****
role_arn: ****
refresh_interval: 1m
relabel_config:
- target_label: __address__
source_labels: [__meta_ec2_private_ip]
replace: "${1}:9400"
- job_name: test-exporter-1
metrics_path: /metrics
scheme: http
ec2_sd_configs: *ec2config
relabel_config:
- target_label: __address__
source_labels: [__meta_ec2_private_ip]
replace: "${1}:9401"
>
> - *job_name: test-exporter-1*
> honor_timestamps: true
> scrape_interval: 15s
> scrape_timeout: 10s
> metrics_path: /metrics
> scheme: http
> ec2_sd_configs:
> - endpoint: ""
> region: ****
> role_arn: ****
> refresh_interval: 1m
> *port: 9100*
> filters: []
>
> - *job_name: test-exporter-2*
> honor_timestamps: true
> scrape_interval: 15s
> scrape_timeout: 10s
> metrics_path: /metrics
> scheme: http
> ec2_sd_configs:
> - endpoint: ""
> region: ****
> role_arn: ****
> refresh_interval: 1m
> *port: 9404*
> filters: []
>
>
>
>
> On Friday, January 31, 2020 at 9:46:22 AM UTC-7, srini_at_work wrote:
> >
> > hello pro-me-the-us,
> >
> > We have got ec2_sd_configs workring for tracing node exporter metrics on
> > port 9100 with below configuration.
> >
> > - job_name: test
> > honor_timestamps: true
> > scrape_interval: 15s
> > scrape_timeout: 10s
> > metrics_path: /metrics
> > scheme: http
> > ec2_sd_configs:
> > - endpoint: ""
> > region: ****
> > role_arn: ****
> > refresh_interval: 1m
> > port: 9100
> > filters: []
> >
> > We have not added other exporters exposing metrics on another port for ex:
> > 9404. Now is there any easy way, I can provide multiple port in same job
> > configuration or only way is to copy the above configuration with different
> > job name just change port? it looks very redundant, but trying to find out
> > if that is the only way to do it?
> >
> > Thanks for your help and input!
> >
>
> --
> 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
prometheus-use...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/05921295-5311-40b4-b81a-cb52e33151b7%40googlegroups.com.
--
(o- Julien Pivotto
//\ Open-Source Consultant
V_/_ Inuits -
https://www.inuits.eu