diff --git a/docs/help.md b/docs/help.md index 1b9b6a2fa..fb111faef 100644 --- a/docs/help.md +++ b/docs/help.md @@ -11,6 +11,7 @@ * [Pino with `debug`](#debug) * [Unicode and Windows terminal](#windows) * [Mapping Pino Log Levels to Google Cloud Logging (Stackdriver) Severity Levels](#stackdriver) +* [Using Grafana Loki to evaluate pino logs in a kubernetes cluster](#grafana-loki) * [Avoid Message Conflict](#avoid-message-conflict) * [Best performance for logging to `stdout`](#best-performance-for-stdout) * [Testing](#testing) @@ -259,6 +260,15 @@ module.exports = function createLogger(options) { } ``` + +## Using Grafana Loki to evaluate pino logs in a kubernetes cluster + +To get pino logs into Grafana Loki there are two options: + +1. **Push:** Use [pino-loki](https://github.com/Julien-R44/pino-loki) to send logs directly to Loki. +1. **Pull:** Configure Grafana Promtail to read and properly parse the logs before sending them to Loki. + 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. + ## Avoid Message Conflict