logstash module: use literalExample
This commit is contained in:
parent
9c249a3adf
commit
e1493f2ba7
@ -85,7 +85,7 @@ in
|
|||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''stdin { type => "example" }'';
|
default = ''stdin { type => "example" }'';
|
||||||
description = "Logstash input configuration.";
|
description = "Logstash input configuration.";
|
||||||
example = ''
|
example = literalExample ''
|
||||||
# Read from journal
|
# Read from journal
|
||||||
pipe {
|
pipe {
|
||||||
command => "''${pkgs.systemd}/bin/journalctl -f -o json"
|
command => "''${pkgs.systemd}/bin/journalctl -f -o json"
|
||||||
@ -98,7 +98,7 @@ in
|
|||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''noop {}'';
|
default = ''noop {}'';
|
||||||
description = "logstash filter configuration.";
|
description = "logstash filter configuration.";
|
||||||
example = ''
|
example = literalExample ''
|
||||||
if [type] == "syslog" {
|
if [type] == "syslog" {
|
||||||
# Keep only relevant systemd fields
|
# Keep only relevant systemd fields
|
||||||
# http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
|
# http://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
|
||||||
@ -114,7 +114,7 @@ in
|
|||||||
|
|
||||||
outputConfig = mkOption {
|
outputConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''stdout { debug => true debug_format => "json"}'';
|
default = literalExample ''stdout { debug => true debug_format => "json"}'';
|
||||||
description = "Logstash output configuration.";
|
description = "Logstash output configuration.";
|
||||||
example = ''
|
example = ''
|
||||||
redis { host => "localhost" data_type => "list" key => "logstash" codec => json }
|
redis { host => "localhost" data_type => "list" key => "logstash" codec => json }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user