Skip to content

Commit ca96e16

Browse files
authored
Added Info about using Grafana Loki (#1934)
1 parent 4573245 commit ca96e16

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/help.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* [Pino with `debug`](#debug)
1212
* [Unicode and Windows terminal](#windows)
1313
* [Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Severity Levels](#stackdriver)
14+
* [Using Grafana Loki to evaluate pino logs in a kubernetes cluster](#grafana-loki)
1415
* [Avoid Message Conflict](#avoid-message-conflict)
1516
* [Best performance for logging to `stdout`](#best-performance-for-stdout)
1617
* [Testing](#testing)
@@ -259,6 +260,15 @@ module.exports = function createLogger(options) {
259260
}
260261
```
261262

263+
<a id="grafana-loki"></a>
264+
## Using Grafana Loki to evaluate pino logs in a kubernetes cluster
265+
266+
To get pino logs into Grafana Loki there are two options:
267+
268+
1. **Push:** Use [pino-loki](https://github.com/Julien-R44/pino-loki) to send logs directly to Loki.
269+
1. **Pull:** Configure Grafana Promtail to read and properly parse the logs before sending them to Loki.
270+
Similar to Google Cloud logging, this involves remapping the log levels. See this [article](https://medium.com/@janpaepke/structured-logging-in-the-grafana-monitoring-stack-8aff0a5af2f5) for details.
271+
262272
<a id="avoid-message-conflict"></a>
263273
## Avoid Message Conflict
264274

0 commit comments

Comments
 (0)