Grafana Loki¶
Archived (pre-2022)
Preserved for reference only -- likely outdated. View original | Last updated: September 2021
Accessing Grafana Loki¶
Each EKS cluster has its own Grafana preconfigured with Dashboard as a code and Loki deployed.
You should be able to access it with Okta login/password (Login:
Grafana EKS Resource Metrics Dashboard as a code - custom-dashboard.json (Bitbucket)
| Cluster | Region | URL |
|---|---|---|
| OFW PRD | Ireland | Grafana |
| OFW STG | Ireland | Grafana |
| FAIRBID | Ireland | Grafana |
| FAIRBID | Oregon | Grafana |
| FAIRBID | Virginia | Grafana |
Enabling log collection¶
By default Loki collects logs only from its own log collector container called Promtail. Thus we'll be using Promtail's logs for demonstration.
In order to get your logs into Loki the following annotation needs to be added to the Pod that you want to collect logs from:
Adding annotation on the fly also possible with kubectl:
Seeing logs in Loki¶
Once logged in to Grafana UI, proceed to Explore:

Choose Loki as datasource:

Log browser allows quickly compile query from logs metadata available for Loki.
When needed labels selected - press Show logs:

In the example above we want to see logs for Namespace: kube-system, Pod: grafana-promtail-main-s6s4q and Container: promtail
The result will be similar to this:

More on LogQL syntax¶
Visit Loki docs for details: Grafana - Logql