nodeattrs.asciidoc 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. [[cat-nodeattrs]]
  2. == cat nodeattrs
  3. The `nodeattrs` command shows custom node attributes.
  4. For example:
  5. [source,js]
  6. --------------------------------------------------
  7. GET /_cat/nodeattrs?v
  8. --------------------------------------------------
  9. // CONSOLE
  10. Could look like:
  11. [source,txt]
  12. --------------------------------------------------
  13. node host ip attr value
  14. EK_AsJb 127.0.0.1 127.0.0.1 testattr test
  15. --------------------------------------------------
  16. // TESTRESPONSE[s/EK_AsJb/.+/ _cat]
  17. The first few columns (`node`, `host`, `ip`) give you basic info per node
  18. and the `attr` and `value` columns give you the custom node attributes,
  19. one per line.
  20. [float]
  21. === Columns
  22. Below is an exhaustive list of the existing headers that can be
  23. passed to `nodeattrs?h=` to retrieve the relevant details in ordered
  24. columns. If no headers are specified, then those marked to Appear
  25. by Default will appear. If any header is specified, then the defaults
  26. are not used.
  27. Aliases can be used in place of the full header name for brevity.
  28. Columns appear in the order that they are listed below unless a
  29. different order is specified (e.g., `h=attr,value` versus `h=value,attr`).
  30. When specifying headers, the headers are not placed in the output
  31. by default. To have the headers appear in the output, use verbose
  32. mode (`v`). The header name will match the supplied value (e.g.,
  33. `pid` versus `p`). For example:
  34. [source,js]
  35. --------------------------------------------------
  36. GET /_cat/nodeattrs?v&h=name,pid,attr,value
  37. --------------------------------------------------
  38. // CONSOLE
  39. Might look like:
  40. [source,js]
  41. --------------------------------------------------
  42. name pid attr value
  43. EK_AsJb 19566 testattr test
  44. --------------------------------------------------
  45. // TESTRESPONSE[s/EK_AsJb/.+/ s/19566/\\d*/ _cat]
  46. [cols="<,<,<,<,<",options="header",subs="normal"]
  47. |=======================================================================
  48. |Header |Alias |Appear by Default |Description |Example
  49. |`node`|`name`|Yes|Name of the node|DKDM97B
  50. |`id` |`nodeId` |No |Unique node ID |k0zy
  51. |`pid` |`p` |No |Process ID |13061
  52. |`host` |`h` |Yes |Host name |n1
  53. |`ip` |`i` |Yes |IP address |127.0.1.1
  54. |`port` |`po` |No |Bound transport port |9300
  55. |`attr` | `attr.name` | Yes | Attribute name | rack
  56. |`value` | `attr.value` | Yes | Attribute value | rack123
  57. |=======================================================================