CloudGrains logo

Kubernetes · Prometheus · Blackbox Exporter

Monitor website uptime and SSL expiry in Kubernetes

This guide walks through a first Monitoring Pack deployment, from setting website targets to checking that the probe data reaches Grafana. Monitoring Pack uses Blackbox Exporter for external checks, Prometheus to collect and evaluate metrics, Grafana for dashboards, and Alertmanager to route notifications.

1. Get the chart and review compatibility

Monitoring Pack is published as a Helm chart in its GitHub repository. Clone the repository and inspect its README and chart metadata before installing. The README currently lists Helm 3.8+; its Kubernetes minimum differs between the prerequisites text and badge, so verify that requirement against the version you plan to deploy.

git clone https://github.com/cloudgrains/devops-moniotring-package.git
cd devops-moniotring-package
helm version
kubectl version

The chart uses persistent volumes by default. Confirm that your cluster has a suitable default StorageClass, or use the repository’s minimal example values for local testing without persistent storage.

2. Add targets and configure access

Copy the chart defaults to a separate values file and add the public URLs you want to probe. An HTTPS target is also checked for TLS certificate validity and expiry. The example below follows the chart’s documented values structure:

cp values.yaml my-values.yaml
targets:
  - name: Company website
    url: https://www.example.com
  - name: Public API
    url: https://api.example.com/health

grafana:
  adminPassword: "replace-with-a-strong-password"

Protect the Grafana password and any endpoint credentials. Keep real secrets out of version control and inject them through your deployment secret process. Do not expose Grafana anonymously unless you have reviewed the security implications in the chart documentation.

3. Install and verify the release

Install from the chart directory, then wait for the workloads to become ready. Replace the example release name or namespace consistently if you choose different values.

helm install website-monitor . \
  --namespace monitoring \
  --create-namespace \
  -f my-values.yaml

kubectl get pods -n monitoring -w

Forward the Grafana service locally and sign in with the configured credentials. The chart README gives the generated service name and exposes the pre-provisioned Website Monitoring Dashboard. Check Prometheus targets for the Blackbox scrape and confirm your target has recent probe results before relying on notifications.

kubectl port-forward -n monitoring \
  svc/website-monitor-monitoring-pack-grafana 3000:3000

4. Connect notifications and validate alerts

Configure a supported Alertmanager receiver in the chart values and use a safe test endpoint or controlled maintenance window to validate the full alert path: Prometheus rule, Alertmanager routing, and delivery to your chosen channel. Avoid deliberately interrupting a production service to test alerting.

The chart documents default website availability and response-time alerts, SSL expiry warnings, and optional SLO/error-budget rules. Probe cadence and alert thresholds are configurable; review the chart’s current values and alert reference rather than assuming defaults suit every service.