Learn R Programming

elastic (version 0.3.0)

nodes: Elasticsearch nodes endpoints.

Description

Elasticsearch nodes endpoints.

Usage

nodes_stats(node = NULL, metric = NULL, raw = FALSE, fields = NULL,
  verbose = TRUE, ...)

nodes_info(node = NULL, metric = NULL, raw = FALSE, verbose = TRUE, ...)

nodes_hot_threads(node = NULL, metric = NULL, threads = 3, interval = "500ms", type = NULL, raw = FALSE, verbose = TRUE, ...)

Arguments

node
The node
metric
A metric to get
raw
If TRUE (default), data is parsed to list. If FALSE, then raw JSON.
fields
You can get information about field data memory usage on node level or on index level
verbose
If TRUE (default) the url call used printed to console
...
Curl args passed on to GET
threads
(character) Number of hot threads to provide. Default: 3
interval
(character) The interval to do the second sampling of threads. Default: 500ms
type
(character) The type to sample, defaults to cpu, but supports wait and block to see hot threads that are in wait or block state.

Details

http://bit.ly/11gezop

By default, all stats are returned. You can limit this by combining any of indices, os, process, jvm, network, transport, http, fs, breaker and thread_pool. With the metric parameter you can select zero or more of:

  • indices Indices stats about size, document count, indexing and deletion times, search times, field cache size, merges and flushes
  • fs File system information, data path, free disk space, read/write stats
  • http HTTP connection information
  • jvm JVM stats, memory pool information, garbage collection, buffer pools
  • network TCP information
  • os Operating system stats, load average, cpu, mem, swap
  • process Process statistics, memory consumption, cpu usage, open file descriptors
  • thread_pool Statistics about each thread pool, including current size, queue and rejected tasks
  • transport Transport statistics about sent and received bytes in cluster communication
  • breaker Statistics about the field data circuit breaker

nodes_hot_threads returns plain text, so cat is used to print to the console.

Examples

Run this code
(out <- nodes_stats())
nodes_stats(node = names(out$nodes))
nodes_stats(metric='get')
nodes_stats(metric='jvm')
nodes_stats(metric=c('os','process'))
nodes_info()
nodes_info(metric='process')
nodes_info(metric='jvm')
nodes_info(metric='http')
nodes_hot_threads()

Run the code above in your browser using DataLab