Merge pull request #21311 from makefu/services/logstash
services.logstash: default options, examples and address update
This commit is contained in:
commit
117e5547d1
@ -18,6 +18,7 @@ with lib;
|
|||||||
(mkRenamedOptionModule [ "services" "elasticsearch" "host" ] [ "services" "elasticsearch" "listenAddress" ])
|
(mkRenamedOptionModule [ "services" "elasticsearch" "host" ] [ "services" "elasticsearch" "listenAddress" ])
|
||||||
(mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ])
|
(mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ])
|
||||||
(mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ])
|
(mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ])
|
||||||
|
(mkRenamedOptionModule [ "services" "logstash" "address" ] [ "services" "logstash" "listenAddress" ])
|
||||||
(mkRenamedOptionModule [ "services" "kibana" "host" ] [ "services" "kibana" "listenAddress" ])
|
(mkRenamedOptionModule [ "services" "kibana" "host" ] [ "services" "kibana" "listenAddress" ])
|
||||||
(mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ])
|
(mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ])
|
||||||
(mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ])
|
(mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ])
|
||||||
|
@ -63,7 +63,7 @@ in
|
|||||||
description = "Enable the logstash web interface.";
|
description = "Enable the logstash web interface.";
|
||||||
};
|
};
|
||||||
|
|
||||||
address = mkOption {
|
listenAddress = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "0.0.0.0";
|
default = "0.0.0.0";
|
||||||
description = "Address on which to start webserver.";
|
description = "Address on which to start webserver.";
|
||||||
@ -77,7 +77,7 @@ in
|
|||||||
|
|
||||||
inputConfig = mkOption {
|
inputConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''stdin { type => "example" }'';
|
default = ''generator { }'';
|
||||||
description = "Logstash input configuration.";
|
description = "Logstash input configuration.";
|
||||||
example = ''
|
example = ''
|
||||||
# Read from journal
|
# Read from journal
|
||||||
@ -90,7 +90,7 @@ in
|
|||||||
|
|
||||||
filterConfig = mkOption {
|
filterConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''noop {}'';
|
default = "";
|
||||||
description = "logstash filter configuration.";
|
description = "logstash filter configuration.";
|
||||||
example = ''
|
example = ''
|
||||||
if [type] == "syslog" {
|
if [type] == "syslog" {
|
||||||
@ -108,11 +108,11 @@ in
|
|||||||
|
|
||||||
outputConfig = mkOption {
|
outputConfig = mkOption {
|
||||||
type = types.lines;
|
type = types.lines;
|
||||||
default = ''stdout { debug => true debug_format => "json"}'';
|
default = ''stdout { codec => rubydebug }'';
|
||||||
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 }
|
||||||
elasticsearch { embedded => true }
|
elasticsearch { }
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -147,7 +147,7 @@ in
|
|||||||
${cfg.outputConfig}
|
${cfg.outputConfig}
|
||||||
}
|
}
|
||||||
''} " +
|
''} " +
|
||||||
ops cfg.enableWeb "-- web -a ${cfg.address} -p ${cfg.port}";
|
ops cfg.enableWeb "-- web -a ${cfg.listenAddress} -p ${cfg.port}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user