fluent-bit-plugin-yandex

command module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 28 Imported by: 0

README

Fluent Bit plugin for Yandex Cloud Logging

Fluent Bit output for Yandex Cloud Logging.

Configuration parameters

Key Description
group_id (optional) Log group ID. Has higher priority than folder_id.
folder_id (optional) Folder ID. Has lower priority than group_id. Can be auto-detected via metadata service if group_id and folder_id are not set.
resource_type (optional) Resource type of log entries
resource_id (optional) Resource id of log entries
message_tag_key Key of the field to be assigned to the message tag. By default, will be skipped
message_key Key of the field, which will go to message attribute of LogEntry
level_key Key of the field, which contains log level, optional
default_level (optional) Default level for messages, i.e., INFO
default_payload (optional) String with default JSON payload for entries (will be merged together with custom entry payload). You can define templated value as follows: {{key:default}} or {{key}}. All strings matched this template will be replaced by metadata values found via metadata service. You also can use this template as a JSON value (without quotes), so that JSON struct or array will be included in default payload.
authorization see Authorization section below
Metadata

Metadata service documentation.

Metadata url can be configured through environment variable YC_METADATA_URL. By default it's http://169.254.169.254.

Authorization

Configuration parameter authorization may have one of the following values:

Value Description
instance-service-account run on behalf of instance service account
iam-token environment variable YC_TOKEN
must contain a valid IAM token for authorization
iam-key-file:/path/key.json use IAM key for authorization

To create the key file, use yc cli. Example:

  yc iam key create --service-account-name my-service-account --output key.json
Configuration example
[OUTPUT]
    Name            yc-logging
    Match           *
    group_id        abcdefgh
    resource_type   myServer
    resource_id     3
    message_key     text
    level_key       severity
    default_level   WARN
    default_payload {"num":5, "str": "string", "bool": true, "host":"{{instance/hostname}}", "not-found":"{{not/found:default}}", "struct": {{instance/disks/0}}, "array": {{instance/disks}} }
    authorization   instance-service-account

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL