News KrakenD 2023: Milestones and New Horizons

Community Documentation

Recent changes

You are viewing a previous version of KrakenD Community Edition (v2.4) , go to the latest version

Graylog and the GELF format

Document updated on Oct 25, 2022

KrakenD supports sending structured events in GELF format to your Graylog Cluster thanks to the krakend-gelf integration.

The setup of GELF is straightforward and requires to add two components in the configuration:

  • telemetry/logging to capture the logs
  • telemetry/gelf to format the logs

The configuration you need to add is this, and explained below:

{
    "extra_config": {
      "telemetry/gelf": {
        "address": "myGraylogInstance:12201",
        "enable_tcp": false
      },
      "telemetry/logging": {
          "level": "INFO",
          "prefix": "[KRAKEND]",
          "syslog": false,
          "stdout": false
      }
    }
}

The GELF configuration parameters for telemetry/gelf are:

address  *

string
The address (including the port) of your Graylog cluster (or any other service that receives GELF inputs). E.g., myGraylogInstance:12201
enable_tcp  *

boolean
Set to false (recommended) to use UDP, or true to use TCP. TCP performance is worst than UDP under heavy load.

Schema: https://www.krakend.io/schema/v2.4/telemetry/gelf.json
* indicates a required field.

In addition, you must also add the telemetry/logging:

level  *

string
What type of reporting level do you expect from the application? Use the DEBUG level in the development stages but not in production. Possible values are from more verbose to least.
Possible values are: "DEBUG" , "INFO" , "WARNING" , "ERROR" , "CRITICAL"
prefix

string
Adds the defined string at the beginning of every logged line, so you can quickly filter messages with external tools later on. It’s recommended to always add a prefix [INSIDE BRACKETS] to make use of predefined dashboards.
stdout

boolean
Set to true to send logs to stdout.
Defaults to false
syslog

boolean
Set to true to send logs to syslog.
Defaults to false

Schema: https://www.krakend.io/schema/v2.4/telemetry/logging.json
* indicates a required field.

Scarf

Unresolved issues?

The documentation is only a piece of the help you can get! Whether you are looking for Open Source or Enterprise support, see more support channels that can help you.

We use cookies to understand how you use our site and to improve your overall experience. By continuing to use our site, you accept our Privacy Policy. More information