CONSOLEify a few more _cat docs

`_cat/master`, `_cat/nodeattrs`, `_cat/nodes`.
This commit is contained in:
Nik Everett 2016-10-13 16:42:21 -04:00
parent b2c8da25fd
commit 68ed183381
4 changed files with 66 additions and 66 deletions

View File

@ -93,9 +93,6 @@ buildRestTests.expectedUnconvertedCandidates = [
'reference/analysis/tokenfilters/stop-tokenfilter.asciidoc',
'reference/analysis/tokenfilters/synonym-tokenfilter.asciidoc',
'reference/analysis/tokenfilters/word-delimiter-tokenfilter.asciidoc',
'reference/cat/master.asciidoc',
'reference/cat/nodeattrs.asciidoc',
'reference/cat/nodes.asciidoc',
'reference/cat/pending_tasks.asciidoc',
'reference/cat/plugins.asciidoc',
'reference/cat/recovery.asciidoc',

View File

@ -2,14 +2,22 @@
== cat master
`master` doesn't have any extra options. It simply displays the
master's node ID, bound IP address, and node name.
master's node ID, bound IP address, and node name. For example:
[source,sh]
[source,js]
--------------------------------------------------
% curl 'localhost:9200/_cat/master?v'
id ip node
Ntgn2DcuTjGuXlhKDUD4vA 192.168.56.30 H5dfFeA
GET /_cat/master?v
--------------------------------------------------
// CONSOLE
might respond:
[source,js]
--------------------------------------------------
id host ip node
YzWoH_2BT-6UjVGDyPdqYg 127.0.0.1 127.0.0.1 YzWoH_2
--------------------------------------------------
// TESTRESPONSE[s/YzWoH_2.+/.+/ _cat]
This information is also available via the `nodes` command, but this
is slightly shorter when all you want to do, for example, is verify
@ -25,3 +33,4 @@ Ntgn2DcuTjGuXlhKDUD4vA 192.168.56.30 H5dfFeA
[3] 19:16:37 [SUCCESS] es1.vm
Ntgn2DcuTjGuXlhKDUD4vA 192.168.56.30 H5dfFeA
--------------------------------------------------
// NOTCONSOLE

View File

@ -2,34 +2,26 @@
== cat nodeattrs
The `nodeattrs` command shows custom node attributes.
For example:
["source","sh",subs="attributes,callouts"]
[source,js]
--------------------------------------------------
GET /_cat/nodeattrs?v
--------------------------------------------------
// CONSOLE
Could look like:
[source,js]
--------------------------------------------------
% curl 192.168.56.10:9200/_cat/nodeattrs
node host ip attr value
DKDM97B epsilon 192.168.1.8 rack rack314
DKDM97B epsilon 192.168.1.8 azone us-east-1
EK_AsJb 127.0.0.1 127.0.0.1 testattr test
--------------------------------------------------
// TESTRESPONSE[s/EK_AsJb/.+/ _cat]
The first few columns give you basic info per node.
["source","sh",subs="attributes,callouts"]
--------------------------------------------------
node host ip
DKDM97B epsilon 192.168.1.8
DKDM97B epsilon 192.168.1.8
--------------------------------------------------
The attr and value columns can give you a picture of custom node attributes.
[source,sh]
--------------------------------------------------
attr value
rack rack314
azone us-east-1
--------------------------------------------------
The first few columns (`node`, `host`, `ip`) give you basic info per node
and the `attr` and `value` columns give you the custom node attributes,
one per line.
[float]
=== Columns
@ -49,13 +41,20 @@ by default. To have the headers appear in the output, use verbose
mode (`v`). The header name will match the supplied value (e.g.,
`pid` versus `p`). For example:
["source","sh",subs="attributes,callouts"]
[source,js]
--------------------------------------------------
GET /_cat/nodeattrs?v&h=name,pid,attr,value
--------------------------------------------------
// CONSOLE
Might look like:
[source,js]
--------------------------------------------------
% curl 192.168.56.10:9200/_cat/nodeattrs?v&h=name,pid,attr,value
name pid attr value
DKDM97B 28000 rack rack314
DKDM97B 28000 azone us-east-1
EK_AsJb 19566 testattr test
--------------------------------------------------
// TESTRESPONSE[s/EK_AsJb/.+/ s/19566/\\d*/ _cat]
[cols="<,<,<,<,<",options="header",subs="normal"]
|=======================================================================

View File

@ -1,38 +1,31 @@
[[cat-nodes]]
== cat nodes
The `nodes` command shows the cluster topology.
The `nodes` command shows the cluster topology. For example
[source,sh]
[source,js]
--------------------------------------------------
% GET /_cat/nodes
192.168.56.30 9 78 22 1.80 2.05 2.51 mdi * bGG90GE
192.168.56.10 6 75 14 1.24 2.45 1.37 md - I8hydUG
192.168.56.20 5 71 12 1.07 1.05 1.11 di - H5dfFeA
GET /_cat/nodes?v
--------------------------------------------------
// CONSOLE
The first few columns tell you where your nodes live and give
a picture of your heap, memory, cpu and load.
Might look like:
[source,sh]
[source,js]
--------------------------------------------------
ip heap.percent ram.percent cpu load_1m load_5m load_15m
192.168.56.30 9 78 22 1.80 2.05 2.51
192.168.56.10 6 75 14 1.24 2.45 1.37
192.168.56.20 5 71 12 1.07 1.05 1.11
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role master name
127.0.0.1 65 99 42 3.07 mdi * mJw06l1
--------------------------------------------------
// TESTRESPONSE[s/3.07/(\\d+\\.\\d+( \\d+\\.\\d+ (\\d+\\.\\d+)?)?)?/]
// TESTRESPONSE[s/65 99 42/\\d+ \\d+ \\d+/]
// TESTRESPONSE[s/[*]/[*]/ s/mJw06l1/.+/ _cat]
The last columns provide ancillary information that can often be
useful when looking at the cluster as a whole, particularly large
ones. How many master-eligible nodes do I have?
The first few columns (`ip, `heap.percent`, `ram.percent`, `cpu, `load_*`) tell
you where your nodes live and give a quick picture of performance stats.
[source,sh]
--------------------------------------------------
node.role master name
mdi * bGG90GE
md - I8hydUG
di - H5dfFeA
--------------------------------------------------
The last (`node.role`, `master`, and `name`) columns provide ancillary
information that can often be useful when looking at the cluster as a whole,
particularly large ones. How many master-eligible nodes do I have?
[float]
=== Columns
@ -52,18 +45,20 @@ by default. To have the headers appear in the output, use verbose
mode (`v`). The header name will match the supplied value (e.g.,
`pid` versus `p`). For example:
[source,sh]
[source,js]
--------------------------------------------------
GET /_cat/nodes?v&h=id,ip,port,v,m
--------------------------------------------------
// CONSOLE
Might look like:
["source","js",subs="attributes,callouts"]
--------------------------------------------------
% curl 192.168.56.10:9200/_cat/nodes?v&h=id,ip,port,v,m
id ip port v m
pLSN 192.168.56.30 9300 {version} -
k0zy 192.168.56.10 9300 {version} -
6Tyi 192.168.56.20 9300 {version} *
% curl 192.168.56.10:9200/_cat/nodes?h=id,ip,port,v,m
pLSN 192.168.56.30 9300 {version} -
k0zy 192.168.56.10 9300 {version} -
6Tyi 192.168.56.20 9300 {version} *
veJR 127.0.0.1 59938 {version} *
--------------------------------------------------
// TESTRESPONSE[s/veJR/.+/ s/59938/\\d+/ s/[*]/[*]/ _cat]
[cols="<,<,<,<,<",options="header",subs="normal"]
|=======================================================================