3scale-ops / prometheus-exporter-operator

Operator to centralize the setup of 3rd party prometheus exporters on Kubernetes/OpenShift, with a collection of grafana dashboards
Apache License 2.0
42 stars 15 forks source link

Fix Probe (blackbox) grafana dashboard #16

Closed slopezz closed 3 years ago

slopezz commented 3 years ago

There were 2 issues with current Probe (blackbox) grafana dashboard:

  1. When dashboard is deployed, it was failing to load because by accident, template variable target was doing a prometheus query using harcoded Prometheus datasource. This can be truth or not, there is another template var checking the possible correct datasource name.
  2. The singlestat showing the expiration date of SSL certificate, whose format is duration(s), was showing YES instead of the actual date 1month, 2 weeks, 2 days on some grafana versions like grafana v6.5.1 (from grafana operator 3.5), different to the version used when adding the dashboard: image

It seems this is caused on some grafana versions, when using specifically on a singlestat panel, value mappings ( on that case null -> N/A, 1 -> NO, 0 -> YES), and having at the same time having format duration(s), so on that case value mappings are not very important, so I have just removed them.

Now correct expiration date is always shown in case there is a certificate (on that case 1month, 2 weeks, 2 days): image

The only drawback with that change, is that on cases where there is no certificate (plain HTTP, TCP...), instead of showing N/A it shows No Data: image