From aa8e60d934eed31844333ab1bdb6cef3799fc502 Mon Sep 17 00:00:00 2001 From: Tristan Helmich Date: Thu, 10 Aug 2017 21:29:54 +0200 Subject: [PATCH] graylog module: adapt to Graylog version 2.3.0 --- nixos/modules/services/logging/graylog.nix | 24 +++++----------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/nixos/modules/services/logging/graylog.nix b/nixos/modules/services/logging/graylog.nix index 9f0fb11f0252..a0dc0d6d089d 100644 --- a/nixos/modules/services/logging/graylog.nix +++ b/nixos/modules/services/logging/graylog.nix @@ -11,9 +11,7 @@ let password_secret = ${cfg.passwordSecret} root_username = ${cfg.rootUsername} root_password_sha2 = ${cfg.rootPasswordSha2} - elasticsearch_cluster_name = ${cfg.elasticsearchClusterName} - elasticsearch_discovery_zen_ping_multicast_enabled = ${boolToString cfg.elasticsearchDiscoveryZenPingMulticastEnabled} - elasticsearch_discovery_zen_ping_unicast_hosts = ${cfg.elasticsearchDiscoveryZenPingUnicastHosts} + elasticsearch_hosts = ${concatStringsSep "," cfg.elasticsearchHosts} message_journal_dir = ${cfg.messageJournalDir} mongodb_uri = ${cfg.mongodbUri} plugin_dir = /var/lib/graylog/plugins @@ -91,22 +89,10 @@ in ''; }; - elasticsearchClusterName = mkOption { - type = types.str; - example = "graylog"; - description = "This must be the same as for your Elasticsearch cluster"; - }; - - elasticsearchDiscoveryZenPingMulticastEnabled = mkOption { - type = types.bool; - default = false; - description = "Whether to use elasticsearch multicast discovery"; - }; - - elasticsearchDiscoveryZenPingUnicastHosts = mkOption { - type = types.str; - default = "127.0.0.1:9300"; - description = "Tells Graylogs Elasticsearch client how to find other cluster members. See Elasticsearch documentation for details"; + elasticsearchHosts = mkOption { + type = types.listOf types.str; + example = literalExample ''[ "http://node1:9200" "http://user:password@node2:19200" ]''; + description = "List of valid URIs of the http ports of your elastic nodes. If one or more of your elasticsearch hosts require authentication, include the credentials in each node URI that requires authentication"; }; messageJournalDir = mkOption {