git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #21311 from makefu/services/logstash

services.logstash: default options, examples and address update

commit117e5547d1f60096139221f1b2f54956a14f913a authorRobin Gloster <mail@glob.in> dateWed 25 Jan 2017, 22:11 (10 years ago) parentd01b949e9c6cf0
2 files changed+8−7
nixos/modules/rename.nix+1 nixos/modules/services/logging/logstash.nix+7−7
nixos/modules/rename.nix+1
@@ -18,6 +18,7 @@ with lib;
1818 (mkRenamedOptionModule [ "services" "elasticsearch" "host" ] [ "services" "elasticsearch" "listenAddress" ])
1919 (mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ])
2020 (mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ])
21+ (mkRenamedOptionModule [ "services" "logstash" "address" ] [ "services" "logstash" "listenAddress" ])
2122 (mkRenamedOptionModule [ "services" "kibana" "host" ] [ "services" "kibana" "listenAddress" ])
2223 (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ])
2324 (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ])
nixos/modules/services/logging/logstash.nix+7−7
@@ -63,7 +63,7 @@ in
6363 description = "Enable the logstash web interface.";
6464 };
6565
66− address = mkOption {
66+ listenAddress = mkOption {
6767 type = types.str;
6868 default = "0.0.0.0";
6969 description = "Address on which to start webserver.";
@@ -77,7 +77,7 @@ in
7777
7878 inputConfig = mkOption {
7979 type = types.lines;
80− default = ''stdin { type => "example" }'';
80+ default = ''generator { }'';
8181 description = "Logstash input configuration.";
8282 example = ''
8383 # Read from journal
@@ -90,7 +90,7 @@ in
9090
9191 filterConfig = mkOption {
9292 type = types.lines;
93− default = ''noop {}'';
93+ default = "";
9494 description = "logstash filter configuration.";
9595 example = ''
9696 if [type] == "syslog" {
@@ -108,11 +108,11 @@ in
108108
109109 outputConfig = mkOption {
110110 type = types.lines;
111− default = ''stdout { debug => true debug_format => "json"}'';
111+ default = ''stdout { codec => rubydebug }'';
112112 description = "Logstash output configuration.";
113113 example = ''
114− redis { host => "localhost" data_type => "list" key => "logstash" codec => json }
115− elasticsearch { embedded => true }
114+ redis { host => ["localhost"] data_type => "list" key => "logstash" codec => json }
115+ elasticsearch { }
116116 '';
117117 };
118118
@@ -147,7 +147,7 @@ in
147147 ${cfg.outputConfig}
148148 }
149149 ''} " +
150− ops cfg.enableWeb "-- web -a ${cfg.address} -p ${cfg.port}";
150+ ops cfg.enableWeb "-- web -a ${cfg.listenAddress} -p ${cfg.port}";
151151 };
152152 };
153153 };