Skip to content

Commit 2968926

Browse files
authored
loki: examples for log replay (#665)
1 parent 445bbd3 commit 2968926

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

  • crowdsec-docs/docs/data_sources

crowdsec-docs/docs/data_sources/loki.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,21 +89,31 @@ Default to `30 seconds`.
8989

9090
## DSN and command-line
9191

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

9494
### `ssl`
9595

9696
if present, scheme will be set to `https`
9797

98+
```bash
99+
crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}&ssl=true'
100+
```
101+
98102
### `since`
99103

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

106+
Expects a valid [Go duration](https://pkg.go.dev/time#ParseDuration)
107+
108+
```bash
109+
crowdsec -type foobar -dsn 'loki://login:password@localhost:3102/?query={server="demo"}&since=1d'
110+
```
111+
102112
### `log_level`
103113

104114
Set the `log_level` for loki datasource.
105115

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

0 commit comments

Comments
 (0)