{
    "properties": {
        "content-packs": {
            "description": "Content packs configuration properties",
            "properties": {
                "content_packs_auto_load": {
                    "default": "",
                    "description": "A comma-separated list of content packs (files in content_packs_dir) which should be applied on the first start of Graylog e.g. grok-patterns.json",
                    "type": "string"
                },
                "content_packs_dir": {
                    "default": "/mnt/mesos/sandbox/content_pack",
                    "description": "The directory which contains content packs which should be loaded on the first start of Graylog",
                    "type": "string"
                },
                "content_packs_loader_enabled": {
                    "default": false,
                    "description": "Automatically load content packs in content_packs_dir on the first start of Graylog",
                    "type": "boolean"
                },
                "content_packs_uri": {
                    "default": "",
                    "description": "Valid URI to content-pack zip. The unzipped folder must contain the name of the last path of content_packs_dir e.g. content_pack",
                    "type": "string"
                }
            },
            "required": [
                "content_packs_loader_enabled"
            ],
            "type": "object"
        },
        "elasticsearch": {
            "description": "Elasticsearch configuration properties",
            "properties": {
                "analyzer": {
                    "default": "standard",
                    "description": "Analyzer (tokenizer) to use for message and full_message field. The standard filter usually is a good idea",
                    "type": "string"
                },
                "cluster_name": {
                    "default": "mesos-ha",
                    "description": "Clustername of Elasticsearch",
                    "type": "string"
                },
                "discovery_zen_ping_unicast_hosts": {
                    "default": "elasticsearch-executor.elasticsearch.mesos:1026",
                    "description": "Elasticsearch nodes which Graylog is using to connect to the Elasticsearch cluster",
                    "type": "string"
                },
                "index_prefix": {
                    "default": "graylog",
                    "description": "Prefix for all Elasticsearch indices and index aliases managed by Graylog",
                    "type": "string"
                },
                "max_docs_per_index": {
                    "default": 20000000,
                    "description": "Maximum number of documents in an Elasticsearch index before a new index is being created, also see no_retention and elasticsearch_max_number_of_indices",
                    "type": "integer"
                },
                "max_number_of_indices": {
                    "default": 20,
                    "description": "How many indices do you want to keep?",
                    "type": "integer"
                },
                "replicas": {
                    "default": 0,
                    "description": "How many Elasticsearch replicas should be used per index? Note that this only applies to newly created indices",
                    "type": "integer"
                },
                "retention_strategy": {
                    "default": "count",
                    "description": "Graylog will use multiple indices to store documents in. You can configured the strategy it uses to determine when to rotate the currently active write index",
                    "type": "string"
                },
                "shards": {
                    "default": 4,
                    "description": "How many Elasticsearch shards should be used per index? Note that this only applies to newly created indices",
                    "type": "integer"
                }
            },
            "required": [
                "cluster_name",
                "discovery_zen_ping_unicast_hosts"
            ],
            "type": "object"
        },
        "email": {
            "description": "Email transport configuration properties",
            "properties": {
                "transport_email_enabled": {
                    "default": false,
                    "description": "",
                    "type": "boolean"
                },
                "transport_email_from_email": {
                    "default": "graylog@example.com",
                    "description": "",
                    "type": "string"
                },
                "transport_email_hostname": {
                    "default": "mail.example.com",
                    "description": "",
                    "type": "string"
                },
                "transport_email_password": {
                    "default": "secret",
                    "description": "",
                    "type": "string"
                },
                "transport_email_port": {
                    "default": 587,
                    "description": "",
                    "type": "integer"
                },
                "transport_email_subject_prefix": {
                    "default": "[graylog]",
                    "description": "",
                    "type": "string"
                },
                "transport_email_use_ssl": {
                    "default": true,
                    "description": "",
                    "type": "boolean"
                },
                "transport_email_use_tls": {
                    "default": true,
                    "description": "",
                    "type": "boolean"
                },
                "transport_email_user_auth": {
                    "default": true,
                    "description": "",
                    "type": "boolean"
                },
                "transport_email_username": {
                    "default": "you@dcos-example.com",
                    "description": "",
                    "type": "string"
                }
            },
            "required": [
                "transport_email_enabled"
            ],
            "type": "object"
        },
        "general": {
            "description": "Basic configuration properties",
            "properties": {
                "is_master": {
                    "default": true,
                    "description": "If you are running more than one instances of Graylog server you have to select one of these instances as master. The master will perform some periodical tasks that non-masters won't perform",
                    "type": "boolean"
                },
                "node_id_file": {
                    "default": "/usr/share/graylog/data/config/node-id",
                    "description": "The auto-generated node ID will be stored in this file and read after restarts. It is a good idea to use an absolute file path here if you are starting Graylog server from init scripts or similar",
                    "type": "string"
                },
                "password_secret": {
                    "default": "vSh8aXTZGZkOKNIBZYMCJKUybw4cLz1sA2VNEwPS9FGikxt7w9275xDlAaBYoOzL0pYq5c1V7lsW8pufrE96JpNfywYZ46ga",
                    "description": "Set a secret to secure/pepper the stored user passwords",
                    "type": "string"
                },
                "root_email": {
                    "default": "",
                    "description": "The email address of the root user",
                    "type": "string"
                },
                "root_password": {
                    "default": "admin",
                    "description": "Plain password for the admin user or a secure sha code",
                    "type": "string"
                },
                "root_password_is_sha": {
                    "default": false,
                    "description": "Enable this if your root_password is a sha code",
                    "type": "boolean"
                },
                "root_timezone": {
                    "default": "UTC",
                    "description": "The time zone setting of the root user. See http://www.joda.org/joda-time/timezones.html for a list of valid time zones",
                    "type": "string"
                },
                "root_username": {
                    "default": "admin",
                    "description": "Username for the admin user",
                    "type": "string"
                }
            },
            "required": [
                "is_master"
            ],
            "type": "object"
        },
        "mongodb": {
            "description": "MongoDB configuration properties",
            "properties": {
                "max_connections": {
                    "default": 1000,
                    "description": "Increase this value according to the maximum connections your MongoDB server can handle from a single client if you encounter MongoDB connection problems",
                    "type": "integer"
                },
                "threads_allowed_to_block_multiplier": {
                    "default": 5,
                    "description": "Number of threads allowed to be blocked by MongoDB connections multiplier",
                    "type": "integer"
                },
                "uri": {
                    "default": "mongodb://mongodb.marathon.mesos/graylog",
                    "description": "MongoDB connection string",
                    "type": "string"
                }
            },
            "required": [
                "uri"
            ],
            "type": "object"
        },
        "plugins": {
            "description": "Plugin configuration properties",
            "properties": {
                "enable_plugins": {
                    "default": false,
                    "description": "",
                    "type": "boolean"
                },
                "plugin_dir": {
                    "default": "/mnt/mesos/sandbox/plugin",
                    "description": "Set plugin directory here (relative or absolute)",
                    "type": "string"
                },
                "plugin_uri": {
                    "default": "",
                    "description": "Valid URI to plugin zip. The unzipped folder must contain the name of the last path of plugin_dir e.g. plugin",
                    "type": "string"
                }
            },
            "required": [
                "enable_plugins"
            ],
            "type": "object"
        },
        "rest": {
            "description": "REST configuration properties",
            "properties": {
                "rest_enable_cors": {
                    "default": true,
                    "description": "Enable CORS headers for REST API. This is necessary for JS-clients accessing the server directly. If these are disabled, modern browsers will not be able to retrieve resources from the server. This is enabled by default. Uncomment the next line to disable it",
                    "type": "boolean"
                },
                "rest_enable_gzip": {
                    "default": false,
                    "description": "Enable GZIP support for REST API. This compresses API responses and therefore helps to reduce overall round trip times. This is disabled by default. Uncomment the next line to enable it",
                    "type": "boolean"
                },
                "rest_listen_uri": {
                    "default": "http://$HOST:$PORT0/",
                    "description": "REST API listen URI. Must be reachable by other Graylog server nodes if you run a cluster. When using Graylog Collectors, this URI will be used to receive heartbeat messages and must be accessible for all collectors",
                    "type": "string"
                },
                "rest_max_header_size": {
                    "default": 8192,
                    "description": "The maximum size of the HTTP request headers in bytes",
                    "type": "number"
                },
                "rest_max_initial_line_length": {
                    "default": 4096,
                    "description": "The maximal length of the initial HTTP/1.1 line in bytes",
                    "type": "number"
                },
                "rest_thread_pool_size": {
                    "default": 16,
                    "description": "The size of the thread pool used exclusively for serving the REST API",
                    "type": "number"
                },
                "rest_transport_uri": {
                    "default": "http://$HOST:$PORT0/",
                    "description": "REST API transport address. Defaults to the value of rest_listen_uri. Exception: If rest_listen_uri is set to a wildcard IP address (0.0.0.0) the first non-loopback IPv4 system address is used. If set, this will be promoted in the cluster discovery APIs, so other nodes may try to connect on this address and it is used to generate URLs addressing entities in the REST API. (see rest_listen_uri). You will need to define this, if your Graylog server is running behind a HTTP proxy that is rewriting the scheme, host name or URI",
                    "type": "string"
                }
            },
            "required": [
                "rest_listen_uri",
                "rest_transport_uri"
            ],
            "type": "object"
        },
        "service": {
            "additionalProperties": false,
            "description": "Graylog app configuration properties.",
            "properties": {
                "cpus": {
                    "default": 1,
                    "description": "CPU shares to allocate to each Graylog instance",
                    "minimum": 0,
                    "type": "number"
                },
                "disk": {
                    "default": 0,
                    "description": "Disk (MB) to allocate to each Graylog instance",
                    "minimum": 0,
                    "type": "number"
                },
                "elasticsearch_transport_port": {
                    "default": 0,
                    "description": "Port of the Elascticsearch client transport port",
                    "type": "number"
                },
                "host_volume": {
                    "default": "/tmp",
                    "description": "The location of a volume on the host to be used for enabled disk based message journal. The final location will be derived from this value plus the name set in `name` (e.g. `/mnt/host_volume/graylog`). Note that this path must be the same on all DCOS agents",
                    "type": "string"
                },
                "instances": {
                    "default": 1,
                    "description": "Number of Graylog instances to run",
                    "minimum": 1,
                    "type": "integer"
                },
                "jvm": {
                    "additionalProperties": false,
                    "description": "JVM configuration properties",
                    "properties": {
                        "heap_max": {
                            "default": 2048,
                            "description": "Memory (MB) max size for the JVM heap. This number should be less than the memory allocated to the Marathon instance (General rule: 50%)",
                            "minimum": 0,
                            "type": "integer"
                        },
                        "heap_min": {
                            "default": 1024,
                            "description": "Memory (MB) start size for the JVM heap. This number should be be less or equals than the heap_max",
                            "minimum": 0,
                            "type": "integer"
                        },
                        "metaspace_max": {
                            "default": 256,
                            "description": "Memory (MB) max size for the JVM Metaspace. This limit the amount of native memory used for class metadata",
                            "minimum": 0,
                            "type": "integer"
                        }
                    },
                    "required": [
                        "heap_min",
                        "heap_max",
                        "metaspace_max"
                    ],
                    "type": "object"
                },
                "marathon_uri": {
                    "default": "http://master.mesos:8080",
                    "description": "URI of Marathon instance",
                    "type": "string"
                },
                "mem": {
                    "default": 4096.0,
                    "description": "Memory (MB) to allocate to each Graylog task",
                    "minimum": 0,
                    "type": "number"
                },
                "name": {
                    "default": "graylog",
                    "description": "Name for this Graylog instance",
                    "type": "string"
                },
                "rest_port": {
                    "default": 0,
                    "description": "Port of the REST-API",
                    "type": "number"
                },
                "role": {
                    "default": "*",
                    "description": "Deploy Graylog only on nodes with this role",
                    "type": "string"
                },
                "web_port": {
                    "default": 0,
                    "description": "Port of the user interface",
                    "type": "number"
                }
            },
            "required": [
                "name",
                "instances",
                "cpus",
                "mem",
                "disk",
                "host_volume",
                "rest_port",
                "elasticsearch_transport_port",
                "web_port",
                "role",
                "marathon_uri"
            ],
            "type": "object"
        },
        "web": {
            "description": "Web configuration properties",
            "properties": {
                "web_enable": {
                    "default": true,
                    "description": "Enable the embedded Graylog web interface",
                    "type": "boolean"
                },
                "web_enable_cors": {
                    "default": true,
                    "description": "Enable CORS headers for the web interface. This is necessary for JS-clients accessing the server directly. If these are disabled, modern browsers will not be able to retrieve resources from the server",
                    "type": "boolean"
                },
                "web_enable_gzip": {
                    "default": true,
                    "description": "Enable/disable GZIP support for the web interface. This compresses HTTP responses and therefore helps to reduce overall round trip times",
                    "type": "boolean"
                },
                "web_endpoint_uri": {
                    "default": "$rest_transport_uri",
                    "description": "Web interface endpoint URI. This setting can be overriden on a per-request basis with the X-Graylog-Server-URL header",
                    "type": "string"
                },
                "web_listen_uri": {
                    "default": "http://$HOST:$PORT2/",
                    "description": "Web interface listen URI. It must not contain a path other than /",
                    "type": "string"
                },
                "web_max_header_size": {
                    "default": 8192,
                    "description": "The maximum size of the HTTP request headers in bytes",
                    "type": "number"
                },
                "web_max_initial_line_length": {
                    "default": 4096,
                    "description": "The maximal length of the initial HTTP/1.1 line in bytes",
                    "type": "number"
                },
                "web_thread_pool_size": {
                    "default": 16,
                    "description": "The size of the thread pool used exclusively for serving the web interface",
                    "type": "number"
                }
            },
            "required": [
                "web_enable"
            ],
            "type": "object"
        }
    },
    "type": "object"
}