Skip to content

TelkomIndonesia/loki-push-pipe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Loki Push Pipe

A very simple service to pipe loki push API message to stdout as JSON object. The objective is to be able to multiplex logs send to loki to another service(s) such as kafka or elasticsearch using already-made utility such as fluent-bit or benthos. See example for reference on how to pipe received logs to fluent-bit.

JSON Data

Each entry received by loki-push-pipe will be converted to one json message with the following structure:

{
    "labels": {
        "<key1>":"<value1>",
        "<key2>":"<value2>",
        "...":"..."
    },
    "timestamp": "<rfc3999nano 2006-01-02T15:04:05.999999999Z07:00>",
    "tenant_id": "<the tenant id>",
    "line": "<the actual log>"
}

Each entry outputted will be separated by new line.