http response prometheus /api/v1/query 200 {"status":"success","data":{"resultType":"vector","result":[{"metric":{"other":"prom1"},"value":[1698249632.491,"1"]}]}}
http start prometheus 127.0.0.1:7265

! exec pint --no-color lint rules
! stdout .
cmp stderr stderr.txt

-- stderr.txt --
level=INFO msg="Loading configuration file" path=.pint.hcl
level=INFO msg="Finding all rules to check" paths=["rules"]
level=INFO msg="Checking Prometheus rules" entries=1 workers=10 online=true
level=INFO msg="Finding Prometheus servers using Prometheus API query" uri=http://127.0.0.1:7265 query=prometheus_ready
level=ERROR msg="Execution completed with error(s)" err="prometheusQuery discovery  failed to generate Prometheus config from a template: bad name template \"{{ $name }}\": template: discovery:1: undefined variable \"$name\""
-- rules/0001.yml --
groups:
- name: foo
  rules:
  - record: sum:up
    expr: sum(up)
-- .pint.hcl --
discovery {
  prometheusQuery {
    uri = "http://127.0.0.1:7265"
    query = "prometheus_ready"
    template {
      name     = "{{ $name }}"
      uri      = "https://{{ $name }}.example.com"
      exclude  = [".*"]
    }
  }
}
