Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions _data/external_links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,23 @@ lunr-search-help:
id: lunr-search-help
url: https://lunrjs.com/guides/searching.html
title: [ "Lunar search help" ]

grafana-loki:
id: grafana-loki
url: https://grafana.com/docs/loki/latest/
title: [ "Grafana Loki" ]

grafana-loki-endpoint:
id: grafana-loki-endpoint
url: https://grafana.com/docs/loki/latest/reference/loki-http-api/#push-log-entries-to-loki
title: [ "Grafana Loki HTTP endpoint" ]

app-default-cred:
id: app-default-cred
url: https://cloud.google.com/docs/authentication/application-default-credentials
title: [ "Application Default Credentials" ]

grpc-core:
id: grpc-core
url: https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
title: [ "GRPC Core library documentation" ]
15 changes: 15 additions & 0 deletions _includes/doc/admin-guide/options/channel-args.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## channel-args()

| Type:| |
|Default:| |

*Description:* The `channel-args()` option is available in gRPC-based drivers. The option accepts name-value pairs and sets channel arguments defined in the GRPC Core library documentation.

### Example: channel-args() declaration

```config
channel-args(
"grpc.loadreporting" => 1
"grpc.minimal_stack" => 0
)
```
24 changes: 24 additions & 0 deletions _includes/doc/admin-guide/options/gRPC-keep-alive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## keep-alive()

This option configures the forwarding of [gRPC keepalive pings](https://grpc.io/docs/guides/keepalive/) in syslog-ng OSE.

### max-pings-without-data()

| Type:| integer|
|Default:| |

*Description:* This option definies the maximum number of gRPC pings that are allowed to be sent when there is no data/header frame. Any pings succeeding this limit are not sent. Setting this option to `0` disables this restriction and keep sending pings.

### time()

| Type:| number[milliseconds]|
|Default:| |

*Description:* syslog-ng OSE sends a gRPC keepalive ping after the amount of time defined in the `time()` option elapsed.

### timeout()

| Type:| number[milliseconds]|
|Default:| 10|

*Description:* The time syslog-ng OSE waits for an acknowledgement.
26 changes: 26 additions & 0 deletions doc/_admin-guide/060_Sources/035_Jellyfin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Jellyfin log source
short_title: Jellyfin
id: adm-src-jfin
description: >-
In syslog-ng OSE 4.7 and later versions it is possible to use the `jellyfin()` source to read [Jellyfin](https://jellyfin.org/) logs from its log file output.
---

### Example: minimal configuration of jellyfin()

```config
source s_jellyfin {
jellyfin(
base-dir("/path/to/jellyfin/root/log/dir")
filename-pattern("log_*.log")
);
};
```

The `jellyfin()` source can use wildcard-file() source options, since it is based on the `wildcard-file()` source.

The `jellyfin()` driver is a reusable configuration snippet. For more information on using configuration snippets, see Reusing configuration blocks. The source of this configuration snippet can be accessed as the Jellyfish config file on GitHub. [GitHub](https://github.com/syslog-ng/syslog-ng/blob/master/scl/jellyfin/jellyfin.conf).

For more information about Jellyfin logs, see the Jellyfin Main Configuration and Jellyfin Log Directory section in the Jellyfin documentation.
* [https://jellyfin.org/docs/general/administration/configuration/#main-configuration](https://jellyfin.org/docs/general/administration/configuration/#main-configuration)
* [https://jellyfin.org/docs/general/administration/configuration/#log-directory](https://jellyfin.org/docs/general/administration/configuration/#log-directory)
136 changes: 136 additions & 0 deletions doc/_admin-guide/070_Destinations/125_Loki/001_Loki_options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
---
title: loki() destination options
id: adm-dest-loki-opt
---

The `loki()` driver sends messages to a Loki Grafana database and has the following options:

## auth()

The `auth()` option can be used to set the authentication of the driver. The default state of this option is `insecure`, as it is not defined.

The following sub-options are available for `auth()`.

### adc()

This option is an authentication method that is only available for destinations. For more information, see Application Default Credentials.

### alts()

This option is an accessible authentication available for Google infrastructures. Service accounts can be listed with the nested `target-service-account()` option, to match these against the server.

#### Example: configure a Loki destination using auth(alts())

```config
destination {
loki(
port(1234)
auth(alts())
);
};
```

### insecure()

This option can be used to disable authentication: `auth(insecure())`.

### tls()

The `tls()` option accepts the following nested sub-options.
* ca-file()
* key-file()
* cert-file()

#### Example: configure a Loki destination using auth(tls())

```config
destination {
loki(
url("loki-server:123")
auth(
tls(
ca-file("/path/to/ca.pem")
key-file("/path/to/key.pem")
cert-file("/path/to/cert.pem")
)
)
);
};
```

{% include doc/admin-guide/options/batch-bytes.md %}

{% include doc/admin-guide/options/batch-lines.md %}

{% include doc/admin-guide/options/batch-timeout.md %}

{% include doc/admin-guide/options/channel-args.md %}

{% include doc/admin-guide/options/gRPC-keep-alive.md %}

## labels()

This option defines the labels applied to the message as they are sent to the destination.

**Declaration:**

```config
labels(
"label-output-name" => "field-of-the-message"
)
```

## template()

| Type:| template or template-function|
|Default:| ${ISODATE} ${HOST} ${MSGHDR} ${MSG}|

*Description:* This option specifies a template that defines the logformat to be used in the destination. For more information on macros and template functions, see Macros of syslog-ng OSE and Template functions of syslog-ng OSE.

## tenant-id()

| Type:| string|
|Default:| |

Available in syslog-ng OSE 4.7 and later versions.

*Description:* This option sets the tenant ID for multi-tenant cases.

**Declaration:**

```config
loki(
url("localhost:9096")
labels(
"app" => "$PROGRAM",
"host" => "$HOST",
)

tenant-id("testTenant")
);
```

## timestamp()

| Type:| `current`, `received`, `msg`|
|Default:| `current`|

*Description:* This option sets the timestamp type to be used for messages sent to a Loki destination.

**NOTE:** Loki destinations only accept subsequent messages with increasing timestamps. Messages with timestamps deviating from this are rejected.
{: .notice--info}

The timestamp types are the following.

* `current`: The message procession output timestamp is used. This type guarantees an increasing timestamp order, but can deviate significantly from the message generation time.
* `msg`: The original timestamp of the message is used.
* `received`: The timestamp of message reception is used.

## url()

| Type:| string|
|Default:| localhost:9095|

*Description:* This option specifies the URL of the Loki endpoint.

{% include doc/admin-guide/options/workers.md %}
25 changes: 25 additions & 0 deletions doc/_admin-guide/070_Destinations/125_Loki/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: 'loki(): Storing messages in a Grafana Loki database'
short_title: Loki
id: adm-dest-loki
description: >-
In syslog-ng OSE 4.4 and later versions the `loki()` destination can be used to send log data to Grafana Loki.

For more information on the message format, see Grafna Loki HTTP endpoint.
---

### Example: loki() destination configuration

```config
loki(
url("localhost:9096")
labels(
"app" => "$PROGRAM",
"host" => "$HOST",
)

workers(16)
batch-timeout(10000)
batch-lines(1000)
);
```