Configuring Marveledit

You control how Marvel collects data from an Elasticsearch cluster by configuring Marvel-specific settings in the elasticsearch.yml configuration file on each node. You can add a custom index template to change the settings for the indices Marvel creates to store the data collected from a cluster.

Controlling Marvel Data Collectionedit

You can set the following marvel.agent options in a node’s elasticsearch.yml file to control how Marvel data is collected from the node.

Set to false to disable data collection from the node. Defaults to true.

Controls how often data samples are collected. Defaults to 10s. Set to -1 to temporarily disable data collection.

You can update this setting through the Cluster Update Settings API.

Sets the timeout for collecting index statistics. Defaults to 10m.
Sets the timeout for collecting total indices statistics. Defaults to 10m.

Controls which indices Marvel collects data from. Defaults to all indices. Specify the index names as a comma-separated list, for example test1,test2,test3. Names can include wildcards, for example test*. You can explicitly include or exclude indices by prepending + to include the index, or - to exclude the index. For example, to include all indices that start with test except test3, you could specify +test*,-test3.

You can update this setting through the Cluster Update Settings API.

Sets the timeout for collecting the cluster state. Defaults to 10m.
Sets the timeout for collecting the cluster statistics. Defaults to 10m.
Sets the timeout for collecting the recovery information. Defaults to 10m.
Controls whether or not all recoveries are collected. Set to true to collect only active recoveries. Defaults to false.

Configures where the agent stores monitoring data. By default, the agent uses a local exporter that indexes monitoring data on the cluster where it is installed. Use an HTTP exporter to send data to a separate monitoring cluster. For more information, see Setting up a Separate Monitoring Cluster.

  id1:                              # default local exporter
    type: local

  id2:                                     # example of an http exporter
    type: http                             # exporter type, local or http
    host: [ "http://domain:port",... ]     # host(s) to send data to over http or https

      username: <string>            # basic auth username
      password: <string>            # basic auth password

      timeout: <time_value>         # http connection timeout (default: 6s)
      read_timeout: <time_value>    # http response timeout (default: connection.timeout * 10)
      keep_alive: true | false      # use persistent connections (default: true)

      hostname_verification: true | false  # check host certificate (default: true)
      protocol: <string>                   # security protocol (default: TLSv1.2)
      truststore.path: /path/to/file       # absolute path to the truststore
      truststore.password: <string>        # password for the truststore
      truststore.algorithm: <string>       # format for the truststore (default: SunX509)

Configuring Marvel’s Indicesedit

Marvel uses an index template to configure the indices used to store the data collected from a cluster.

You can retrieve the default template with:

GET /_template/.marvel-es

You can override the default settings by adding your own template. Make sure your template uses the .marvel* matching pattern and has an order of 1 or higher to ensure your template is applied after the default template, which has an order of 0.

For example, the following template increases the number of shards to 5:

PUT /_template/custom_marvel
    "template": ".marvel*",
    "order": 1,
    "settings": {
        "number_of_shards": 5

We recommend only changing the settings section. Other sections are important for the correct operation of the dashboards.

For reference, here is the settings section of the default template:

"settings": {
      "index": {
        "codec": "best_compression",
        "mapper": {
          "dynamic": "false"
        "number_of_shards": "1",
        "number_of_replicas": "1",
        "marvel_version": "2.0.0"