It is not possible as target.json param only override the first entry and will not allow dots.
Prometheus 2.43 enables scrape_config_file so you can split your scrape configs into multiple files. Maybe that can be helpful. On 23 Mar 14:17, Christian Oelsner wrote: > Hello all, > > I am trying to use file_sd with params. > I currently have a scrape job that looks similar to this. > > - job_name: 'confluent-cloud' > scrape_interval: 1m > scrape_timeout: 20s > static_configs: > - targets: > - api.telemetry.confluent.cloud > scheme: https > basic_auth: > username: username > password: password > metrics_path: /v2/metrics/cloud/export > params: > "resource.kafka.id": > - lkc-aaaaa > - lkc-bbbbb > - lkc-ccccc > - lkc-ddddd > > The params are my challenge. They are growing rapidly and i now have some > 40+ clusters. > I have been searching around for guidance on how to do this with file_sd as > this would make my life easier, but alas. I havent been able to decode how > to achieve that. > Is it even possible to have a targets.json/yml with params that would > result in the same as the job above? > > Best regards > Christian Oelsner > > -- > 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/b3e93bdb-6454-494a-a77a-15fb7d6c627en%40googlegroups.com. -- Julien Pivotto @roidelapluie -- 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/ZBzH3YxbG5wOkEuB%40nixos.

