title: Prometheus: Is it possible to write a regex for the job_name>static_configs>targets in config file
body: <p>I have a prometheus.yml config file that monitors a cluster of servers. The config file looks something like this:</p>
  
  <pre><code>    global:
        scrape_interval:     15s # By default, scrape targets every 15 seconds.
  
      scrape_configs:
  
        - job_name: 'prometheus'
          scrape_interval: 5s
          scrape_timeout: 5s
          static_configs:
            - targets: ['localhost:9090']
  
        - job_name: minio
          metrics_path: /minio/prometheus/metrics
          scheme: http
          static_configs:
            - targets: [ "server-01.example.com:9000", "server-02.example.com:9000", "server-03.example.com:9000", "server-04.example.com:9000" ]
  # Upto 32 such servers in the cluster server-{01..32}.example.com:9000
  </code></pre>
  
  <p>I hate to specify each target in the config file. Is there a way we can write a regex for the targets, something like <code>server-{01..32}.example.com:9000</code> instead of specifying each server in the list. 
  I tried different ways to do it, but none worked for me.</p>