1. Multi-source vs specialization #
Understanding where these two tools come from.
Grafana: the agnostic one #
Available in: ✓ OSS ✓ Enterprise ✓ Cloud
Grafana is designed to unify your data. It can display on a single dashboard metrics from Prometheus, logs from Loki, and business data from MySQL or CloudWatch. It is the tool of choice for an overall view of the infrastructure.
Kibana: Elasticsearch's right hand #
Kibana is the window onto your data stored in Elasticsearch. It is unmatched for log exploration, full-text search and security analysis (SIEM). It is an integral part of the ELK stack.
2. Strengths and weaknesses #
Visualization vs exploration.
Direct comparison #
- Grafana: better multi-source alerting, more chart types, very lightweight.
- Kibana: extremely powerful search with KQL (Kibana Query Language), native data discovery tools, advanced index management.
3. Languages, alerting and licenses #
The differences that matter day to day.
Architecture #
Grafana stores no data: each panel queries a data source in its own language. Kibana is the Elasticsearch interface: it only reads Elasticsearch indices, but uses all their features (full-text search, aggregations, machine learning, SIEM). Grafana can also display Elasticsearch data, so both tools can coexist. See Grafana data sources.
Detailed comparison #
| Criterion | Grafana | Kibana |
|---|---|---|
| Sources | more than 150 (Prometheus, Loki, Tempo, SQL, clouds, Elasticsearch…) | Elasticsearch only |
| Languages | each source’s own: PromQL, LogQL, TraceQL, SQL… | KQL, Lucene, ES|QL |
| Log exploration | Explore and Logs Drilldown | Discover, very complete for full-text search |
| Alerting | Grafana Alerting, multi-source, routing through notification policies | Kibana rules on Elasticsearch data, connectors |
| Security | no native SIEM | Elastic Security (SIEM, EDR) |
| License | AGPLv3 (OSS), Enterprise, Cloud | Elastic License 2.0, SSPL or AGPLv3 (since 2024) |
The same question, “number of 5xx errors per service”, is written differently in each tool:
# Grafana + Loki (LogQL)
sum by (service) (count_over_time({env="prod"} | json | status >= 500 [5m]))
# Kibana (KQL, barre de recherche Discover)
http.response.status_code >= 500 and service.name : *
# Kibana (ES|QL)
FROM logs-* | WHERE http.response.status_code >= 500 | STATS erreurs = COUNT(*) BY service.nameGood practice: In many teams, Kibana is used for log investigation and security, and Grafana for cross-cutting dashboards (metrics, SLOs, business data).
4. Conclusion #
When should you use one or the other?
The verdict #
If your priority is performance monitoring and unifying disparate data, Grafana is the clear winner. If you spend your time digging through terabytes of logs to debug specific errors, Kibana remains the most powerful tool.
5. Commands to know and lab #
Run both tools locally.
Commands to know #
| Action | Command |
|---|---|
| Run Grafana | docker run -d --name grafana -p 3000:3000 grafana/grafana |
| Run Elasticsearch (test, security disabled) | docker run -d --name es --net elastic -p 9200:9200 -e discovery.type=single-node -e xpack.security.enabled=false docker.elastic.co/elasticsearch/elasticsearch:<version> |
| Run Kibana | docker run -d --name kibana --net elastic -p 5601:5601 -e ELASTICSEARCH_HOSTS=http://es:9200 docker.elastic.co/kibana/kibana:<version> |
| Check Grafana | curl -s http://localhost:3000/api/health |
| Check Kibana | curl -s http://localhost:5601/api/status | jq .status.overall |
Common mistake: Using different versions for Kibana and Elasticsearch: they must match. Create the network first with docker network create elastic.Lab: the same dashboard in both tools #
- Start Elasticsearch, Kibana and Grafana with the commands above.
- In Kibana, load the Sample web logs sample data (Home, Try sample data).
- Build in Kibana (Lens) a histogram of responses by HTTP code.
- In Grafana, add an Elasticsearch data source pointing to
http://es:9200and thekibana_sample_data_logsindex, then reproduce the same chart. - Compare time spent, visualization options and full-text search.
Expected result: you know which tool fits each of your team’s uses.
