title: Prometheus: Add a label based on other labels
body: <p>I've set up Prometheus to use the file sd from <a href="https://github.com/teralytics/prometheus-ecs-discovery" rel="nofollow noreferrer">prometheus-ecs-discovery</a>:</p>
  
  <pre><code>scrape_configs:
  - job_name: ecs
    file_sd_configs:
      - files:
        - /prometheus/ecs_file_sd.yml
  </code></pre>
  
  <p>This adds among other labels the task arn as a label:</p>
  
  <pre><code>container_label_com_amazonaws_ecs_task_arn=
  "arn:aws:ecs:us-west-1:xxxxxx:task/2c1655cd-36b7-4db9-4326-ee90537b6271"
  </code></pre>
  
  <p>In grafana, I'd like to use the task ID (<code>2c1655cd-36b7-4db9-4326-ee90537b6271</code> in my example) as the legend for most of my stats, which can be extracted from the task arn. Can I somehow <strong>add</strong> a new label?</p>