Skip to content

Commit

Permalink
loki: examples for log replay (#665)
Browse files Browse the repository at this point in the history
  • Loading branch information
blotus authored Nov 6, 2024
1 parent 445bbd3 commit 2968926
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions crowdsec-docs/docs/data_sources/loki.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,21 +89,31 @@ Default to `30 seconds`.

## DSN and command-line

All the parameters above are available via DNS (one-shot mode), plus the following ones:
All the parameters above are available via DSN (one-shot mode), plus the following ones:

### `ssl`

if present, scheme will be set to `https`

```bash
crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}&ssl=true'
```

### `since`

Allows to set the "since" duration for loki query.

Expects a valid [Go duration](https://pkg.go.dev/time#ParseDuration)

```bash
crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}&since=1d'
```

### `log_level`

Set the `log_level` for loki datasource.

```bash
crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}'
crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}&log_level=debug'
```

0 comments on commit 2968926

Please sign in to comment.