Skip to main content

Observability - Grafana Stack

Datadog charges per host. New Relic charges per ingestion. Both send your metrics and logs to the US. Bunker hosts a complete Grafana stack - Grafana, Prometheus, Loki, Alertmanager - fully managed. Your observability data stays in Europe, and your bill stays readable.

Why the Grafana Stack?

Grafana is the most widely used open source visualization platform in the world. Paired with Prometheus for metrics and Loki for logs, it forms a complete observability stack that competes head-on with proprietary solutions.

What sets it apart:

  • Open source: Grafana (Apache 2.0), Prometheus (Apache 2.0), Loki (AGPLv3). Auditable code, no black box
  • Metrics with Prometheus: collection, storage, and PromQL queries across all your application and infrastructure metrics
  • Logs with Loki: lightweight and efficient log aggregation, built for Kubernetes. No more wrestling with Elasticsearch clusters
  • Alerts with Alertmanager: smart alert routing to Slack, email, PagerDuty, or OpsGenie
  • Pre-configured dashboards: Kubernetes monitoring ready to go from day one

Comparison with Alternatives

CriteriaBunkerDatadogNew RelicElastic StackUptrace
Open sourceYes (Apache 2.0)NoNoPartially (SSPL)Yes (BSL)
Sovereign hostingYes (Europe)No (USA)No (USA)Depends on youDepends on you
MetricsPrometheus (PromQL)ProprietaryProprietaryElasticsearchClickHouse
LogsLoki (LogQL)ProprietaryProprietaryElasticsearchClickHouse
AlertingAlertmanagerProprietaryProprietaryWatcherBuilt-in
Custom dashboardsUnlimitedUnlimitedUnlimitedKibanaBuilt-in
REST APIYesYesYesYesYes
Predictable costEUR 30 excl. tax/monthPer host + ingestionPer GB ingestedServer + timeSubscription
Ops costZeroZeroZeroTime + serverTime + server

What Really Changes

Datadog billing is notoriously unpredictable. A traffic spike on a Friday night, and your monthly bill doubles. With Bunker, pricing is fixed: EUR 30 excl. tax/month for the entire stack.

Prometheus and Loki use open query languages (PromQL and LogQL). No vendor lock-in on your metrics or log formats. Grafana dashboards export to JSON and re-import anywhere.

Your data never leaves Europe. For regulated industries (healthcare, finance, public sector), this is not a bonus - it is a requirement.

You Keep Control

  • JSON export: all dashboards exportable via the UI or REST API
  • Standard formats: Prometheus metrics are portable to any Prometheus-compatible system
  • Log portability: standard log formats, migrate to any collector
  • Migration: if you leave Bunker, reinstall Grafana + Prometheus + Loki on your own cluster and re-import your dashboards
  • Open source licenses: the code stays free, the projects cannot become proprietary

Why Bunker Instead of Self-Hosting?

You could install the Grafana stack yourself. But here is what that actually looks like:

AspectSelf-hostingBunker
Metrics retentionTo configure30 days included
Log retentionTo configure15 days included
Grafana databasePostgreSQL to manageManaged CNPG
Kubernetes dashboardsTo importPre-configured
AlertmanagerTo configurePre-configured
High availabilityYour responsibilityGuaranteed
BackupsTo configureAutomatic
Security updatesTo monitorApplied
NetworkPoliciesTo configureApplied
24/7 monitoringIronic, right?Included

The critical point with self-hosting is monitoring the monitoring. Who watches Prometheus when Prometheus goes down? At Bunker, the observability stack itself is supervised by an independent monitoring loop.

Quick Start

1. Deploy from the Console

  1. Go to console.getbunker.net
  2. Create your account or log in
  3. Deploy the Grafana Stack from the service catalog
  4. A few minutes later, Grafana, Prometheus, Loki and Alertmanager are ready

2. Access Grafana

Once the deployment is complete, access your Grafana instance via the URL provided in the console. Admin credentials are available in the service details.

3. First Dashboards

Kubernetes dashboards come pre-configured. Right after deployment, you can explore:

  • Kubernetes / Cluster: CPU, memory, and network overview for the cluster
  • Kubernetes / Pods: per-pod consumption, restarts, statuses
  • Prometheus / Targets: health status of monitored endpoints
  • Loki / Logs: search and filter your application logs

Advanced Features

Adding a Data Source

Grafana natively supports many data sources beyond Prometheus and Loki. To add one, head to Grafana settings:

  1. Go to Configuration > Data Sources
  2. Click Add data source
  3. Choose from available sources: InfluxDB, PostgreSQL, MySQL, Elasticsearch, and many more

Creating a Custom Dashboard

To build a dashboard tailored to your needs:

  1. Click + > New Dashboard
  2. Add a panel with Add visualization
  3. Select your data source (Prometheus for metrics, Loki for logs)
  4. Write your PromQL or LogQL query
  5. Save

Here is a PromQL query example to track the HTTP 5xx error rate across your services:

sum(rate(http_requests_total{status=~"5.."}[5m]))
/
sum(rate(http_requests_total[5m]))

Configuring Alerts

Alertmanager comes pre-configured. To create an alert, you can use the Grafana interface:

  1. Open an existing dashboard panel
  2. Click Alert > Create alert rule
  3. Define the condition (for example: CPU > 80% for 5 minutes)
  4. Configure the notification channel (Slack, email, PagerDuty, OpsGenie)
  5. Save

Grafana REST API

All dashboards are manageable via the REST API. Here is how to export a dashboard:

# Retrieve a dashboard by its UID
curl -H "Authorization: Bearer YOUR_API_TOKEN" \
"https://your-instance.getbunker.net/api/dashboards/uid/MY_DASHBOARD_UID"

And to import a dashboard from the Grafana community:

# Import a JSON dashboard
curl -X POST \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d @dashboard.json \
"https://your-instance.getbunker.net/api/dashboards/db"

Sending Application Logs to Loki

To send your application logs to Loki, use Promtail or the native HTTP client. Here is a quick test with the curl command:

# Send a test log entry to Loki
curl -X POST \
-H "Content-Type: application/json" \
"https://your-loki.getbunker.net/loki/api/v1/push" \
-d '{
"streams": [{
"stream": { "app": "my-service", "env": "production" },
"values": [["'"$(date +%s)000000000"'", "Service started OK"]]
}]
}'

In production, Promtail (or Grafana Agent) automatically collects logs from your Kubernetes pods without manual configuration.

Best Practices

  • Use consistent Prometheus labels (app, env, team) to simplify PromQL queries
  • Keep label cardinality low: too many distinct values degrades Prometheus performance
  • Structure your logs as JSON to fully leverage LogQL in Loki
  • Create alerts on symptoms (latency, error rate) rather than causes (CPU, memory)
  • Export your dashboards to JSON and version them in Git
  • Use Grafana folders to organize dashboards by team or service

Next Steps