# Using a range to set addresses in a configuration file (prometheus.yml)

**URL:** <https://discuss.prometheus.io/t/using-a-range-to-set-addresses-in-a-configuration-file-prometheus-yml/3303>\
**Category:** Prometheus server\
**Created:** [February 25, 2025, 12:15pm UTC](https://discuss.prometheus.io/t/using-a-range-to-set-addresses-in-a-configuration-file-prometheus-yml/3303 "2025-02-25T12:15:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Regina](https://avatars.discourse-cdn.com/v4/letter/r/d78d45/32.png) [@Regina](https://discuss.prometheus.io/u/Regina)\
**Post date:** [February 25, 2025, 12:15pm UTC](https://discuss.prometheus.io/t/using-a-range-to-set-addresses-in-a-configuration-file-prometheus-yml/3303/1 "2025-02-25T12:15:31Z")

</div>

I need to monitor a large number (more than 100) of IP addresses with the same port. How can I set the range of IP addresses in the configuration file (prometheus.yml)?

How it works now:

- job\_name: “example”  
static\_configs:  
- targets:  
- X.X.X.2:port  
- X.X.X.3:port  
- X.X.X.4:port  
- …  
- X.X.X.100:port

As I want for example:

- job\_name: “example”  
static\_configs:  
- targets:  
- [X.X.X.2-X.X.X.100]:port

Is there such functionality?  
Thanks for the help
