Variable not replaced in legend after relabeling

I am using ec2 autodiscovery for prometheus on AWS, with the following configuration

relabel_configs:

  • source_labels: [__meta_ec2_tag_Monitored]
    regex: DCOSProduction.*
    action: keep
  • source_labels: [__meta_ec2_private_ip]
    regex: ‘(.*)’
    target_label: address
    replacement: ‘${1}:9100’
  • source_labels: [__meta_ec2_tag_Name]
    regex: ‘(.*)’
    target_label: ec2_instance

However although the label do gets created, it is not replaced appropriately in legend of a graph

image

image