[prometheus-users] 403 when trying to federate Prometheus metrics

21 views
Skip to first unread message

Kalle Narinen

unread,
Apr 15, 2020, 11:09:30 AM4/15/20
to Prometheus Users
hi, I'm getting 403 as a scrape result with following config
scrape config:
  - job_name: federate
    scheme: https
    honor_labels: true
    tls_config:
      insecure_skip_verify: true
    metrics_path: /federate
    bearer_token: '<openshift service_acccount token'
    params:
      'match[]':
        - '{job="node-exporter"}'
    static_configs:
      - targets:
        - 'prometheus-k8s-openshift-monitoring.<domain>'

With curl from the same prometheus container works and metrics are seen.
curl -k -v -G --data-urlencode 'match[]={job="node-exporter"}' https://prometheus-k8s-openshift-monitoring.<domain>/federate -H 'Authorization: Bearer <openshift service_acccount token'

-Kalle


Kalle Narinen

unread,
Apr 16, 2020, 3:39:46 AM4/16/20
to Prometheus Users
hi, solved by investigating logs and noticing that token was missing a character
Reply all
Reply to author
Forward
0 new messages