ElasticsearchΒΆ

The system plugin gathers general stats on Elasticsearch nodes.

Configuration:
  [[inputs.elasticsearch]]
  #   ## specify a list of one or more Elasticsearch servers
  #   # you can add username and password to your url to use basic authentication:
  #   # servers = ["http://user:pass@localhost:9200"]
  servers = ["http://localhost:9200"]
  #
  #   ## Timeout for HTTP requests to the elastic search server(s)
  http_timeout = "5s"
  #
  #   ## When local is true (the default), the node will read only its own stats.
  #   ## Set local to false when you want to read the node stats from all nodes
  #   ## of the cluster.
  local = true
  #
  #   ## Set cluster_health to true when you want to also obtain cluster health stats
  cluster_health = true
  #
  #   ## Adjust cluster_health_level when you want to also obtain detailed health stats
  #   ## The options are
  #   ##  - indices (default)
  #   ##  - cluster
  cluster_health_level = "cluster"
  #
  #   ## Set cluster_stats to true when you want to also obtain cluster stats from the
  #   ## Master node.
  cluster_stats = false
  #
  #   ## node_stats is a list of sub-stats that you want to have gathered. Valid options
  #   ## are "indices", "os", "process", "jvm", "thread_pool", "fs", "transport", "http",
  #   ## "breaker". Per default, all stats are gathered.
  node_stats = ["http", "os", "process", "jvm", "fs", "transport"]
  #
  #   ## Optional TLS Config
  #   # tls_ca = "/etc/njams/ca.pem"
  #   # tls_cert = "/etc/njams/cert.pem"
  #   # tls_key = "/etc/njams/key.pem"
  #   ## Use TLS but skip chain & host verification
  #   # insecure_skip_verify = false

[inputs.elasticsearch.tags]
  id = "elasticsearch-$HOSTNAME"
  containerid ="$HOSTNAME"
Example Output:
{
    "fields": {
        "buffer_pools_direct_count": 57,
        "buffer_pools_direct_total_capacity_in_bytes": 202607659,
        "buffer_pools_direct_used_in_bytes": 202607660,
        "buffer_pools_mapped_count": 112,
        "buffer_pools_mapped_total_capacity_in_bytes": 523612158,
        "buffer_pools_mapped_used_in_bytes": 523612158,
        "classes_current_loaded_count": 16844,
        "classes_total_loaded_count": 17050,
        "classes_total_unloaded_count": 206,
        "gc_collectors_old_collection_count": 4,
        "gc_collectors_old_collection_time_in_millis": 1342,
        "gc_collectors_young_collection_count": 134937,
        "gc_collectors_young_collection_time_in_millis": 9722027,
        "mem_heap_committed_in_bytes": 6390153216,
        "mem_heap_max_in_bytes": 6390153216,
        "mem_heap_used_in_bytes": 3947201904,
        "mem_heap_used_percent": 61,
        "mem_non_heap_committed_in_bytes": 176607232,
        "mem_non_heap_used_in_bytes": 143385224,
        "mem_pools_old_max_in_bytes": 5919014912,
        "mem_pools_old_peak_max_in_bytes": 5919014912,
        "mem_pools_old_peak_used_in_bytes": 4439634232,
        "mem_pools_old_used_in_bytes": 3797428392,
        "mem_pools_survivor_max_in_bytes": 52297728,
        "mem_pools_survivor_peak_max_in_bytes": 52297728,
        "mem_pools_survivor_peak_used_in_bytes": 52297728,
        "mem_pools_survivor_used_in_bytes": 4903272,
        "mem_pools_young_max_in_bytes": 418840576,
        "mem_pools_young_peak_max_in_bytes": 418840576,
        "mem_pools_young_peak_used_in_bytes": 418840576,
        "mem_pools_young_used_in_bytes": 144870240,
        "threads_count": 149,
        "threads_peak_count": 151,
        "timestamp": 1579000389755,
        "uptime_in_millis": 5950904893
    },
    "name": "elasticsearch_jvm",
    "tags": {
        "cluster_name": "njams",
        "containerid": "$HOSTNAME",
        "host": "os0110.integrationmatters.com",
        "id": "elasticsearch-$HOSTNAME",
        "node_attribute_ml.enabled": "true",
        "node_attribute_ml.machine_memory": "16819273728",
        "node_attribute_ml.max_open_jobs": "20",
        "node_attribute_xpack.installed": "true",
        "node_host": "10.189.0.110",
        "node_id": "O1nMAsDgTgGr3cCA3yot7g",
        "node_name": "njams-node"
    },
    "timestamp": 1579000390
}