- targets: [ '{{ (target.exporter_hostname == prometheus_server) | ternary('127.0.0.1:9999', hostvars[target.exporter_hostname].prometheus_scrape_endpoint) }}' ] labels: instance: '{{ target.instance }}' app_kind: 'whawty-nginx-sso' app_instance: '{{ target.config.app_instance }}' __metrics_path__: '/whawty-nginx-sso/{{ target.config.app_instance }}' {% for name, value in prometheus_target_labels.items() %} {{ name }}: '{{ value }}' {% endfor %}