cloudfoundry / cf-k8s-prometheus

Apache License 2.0
3 stars 5 forks source link

Grafana datasource does not provide protocol #9

Open braunsonm opened 3 years ago

braunsonm commented 3 years ago

Describe the bug

Grafana deployment specifies the prometheus datasource incorrectly. The current configuration without the protocol will work for graphing but will cause errors when you setup alerts.

The link to the prometheus datasource should include the protocol (aka prepend http://)

To Reproduce*

Steps to reproduce the behavior:

  1. Deploy this project with Grafana
  2. Try to make an alert in Grafana
  3. Have it get triggered and view the error stating it is missing the protocol

Expected behavior

Alerting should work out of the box

Additional context

To fix this yourself, apply the following overlay:

#! A bug in Grafana if you do not specify the protocol scheme alerting will stop
#! working. By default CF does not.
#@overlay/match by=overlay.subset({"kind": "ConfigMap", "metadata": {"name": "grafana-datasources"}})
---
data:
  prometheus.yml: |
    apiVersion: 1

    datasources:
      - name: Prometheus
        type: prometheus
        access: proxy
        url: http://prometheus-server.cf-system.svc.cluster.local
cf-gitbot commented 3 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.