页面树结构

2017-11-09 ApacheCN 开源组织,第二期邀请成员活动,一起走的更远 : http://www.apachecn.org/member/209.html


MachineLearning 优酷地址 : http://i.youku.com/apachecn

转至元数据结尾
转至元数据起始

cluster nodes info(集群节点信息)API 可以获取集群中一个或多个节点的信息。

curl -XGET 'http://localhost:9200/_nodes'
curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2'

第一个命令获取了集群中所有节点的统计信息。

第二个只选择获取了 nodeId1 和 nodeId2 的节点的统计信息。

所有节点选择的选项在这里有更详细的说明。

默认情况下,它只节点所有属性和核心配置 : 

属性/配置描述
build_hashShort hash of the last git commit in this release.
hostThe node’s host name.
http_addressHost and port where primary HTTP connections are accepted.
ipThe node’s IP address.
nameThe node’s name.
total_indexing_bufferTotal heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings.
total_indexing_buffer_in_bytesSame as total_indexing_buffer, but expressed in bytes.
transport_addressHost and port where transport HTTP connections are accepted.
versionElasticsearch version running on this node.

它也可以只获取 settingsosprocessjvmthread_pooltransporthttppluginsingest 和 indices 的信息。

curl -XGET 'http://localhost:9200/_nodes/process'
curl -XGET 'http://localhost:9200/_nodes/_all/process'
curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/jvm,process'
# same as above
curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/info/jvm,process'

curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/_all

可以设置 _all 标记以返回所有的信息 - 或者您也可以简单的忽略它。

Operating System information(操作系统信息)

可以设置 os 标记以获取与操作系统有关的信息 : 

标记描述
os.refresh_interval_in_millisRefresh interval for the OS statistics
os.nameName of the operating system (ex: Linux, Windows, Mac OS X)
os.archName of the JVM architecture (ex: amd64, x86)
os.versionVersion of the operating system
os.available_processorsNumber of processors available to the Java virtual machine
os.allocated_processorsThe number of processors actually used to calculate thread pool size. This number can be set with the processors setting of a node and defaults to the number of processors reported by the OS. In both cases this number will never be larger than 32.

Process information(进程信息)

可以设置 process 标记以获取与当前正在运行的进程的有关的信息 : 

标记描述
process.refresh_interval_in_millisRefresh interval for the process statistics
process.idProcess identifier (PID)
process.mlockallIndicates if the process address space has been successfully locked in memory

Plugins information(插件信息)

plugins - 如果被设置,那么结果将包含关于每一个节点已加载的插件的详细信息 : 

  • name: plugin name
  • description: plugin description if any
  • sitetrue if the plugin is a site plugin
  • jvmtrue if the plugin is a plugin running in the JVM
  • url: URL if the plugin is a site plugin

其结果看起来和下面相似 : 

{
  "cluster_name" : "test-cluster-MacBook-Air-de-David.local",
  "nodes" : {
    "hJLXmY_NTrCytiIMbX4_1g" : {
      "name" : "node4",
      "transport_address" : "inet[/172.18.58.139:9303]",
      "hostname" : "MacBook-Air-de-David.local",
      "version" : "0.90.0.Beta2-SNAPSHOT",
      "http_address" : "inet[/172.18.58.139:9203]",
      "plugins" : [ {
        "name" : "test-plugin",
        "description" : "test-plugin description",
        "site" : true,
        "jvm" : false
      }, {
        "name" : "test-no-version-plugin",
        "description" : "test-no-version-plugin description",
        "site" : true,
        "jvm" : false
      }, {
        "name" : "dummy",
        "description" : "No description found for dummy.",
        "url" : "/_plugin/dummy/",
        "site" : false,
        "jvm" : true
      } ]
    }
  }
}

Ingest information(摄取数据信息)

ingest如果被设置,那么结果将包含关于每一个节点可用的处理器的详细信息 : 

  • type: the processor type

其结果看起来和下面相似 : 

{
  "cluster_name": "elasticsearch",
  "nodes": {
    "O70_wBv6S9aPPcAKdSUBtw": {
      "ingest": {
        "processors": [
          {
            "type": "date"
          },
          {
            "type": "uppercase"
          },
          {
            "type": "set"
          },
          {
            "type": "lowercase"
          },
          {
            "type": "gsub"
          },
          {
            "type": "convert"
          },
          {
            "type": "remove"
          },
          {
            "type": "fail"
          },
          {
            "type": "foreach"
          },
          {
            "type": "split"
          },
          {
            "type": "trim"
          },
          {
            "type": "rename"
          },
          {
            "type": "join"
          },
          {
            "type": "append"
          }
        ]
      }
    }
  }
}


  • 无标签