http-export.asciidoc 4.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. [role="xpack"]
  2. [[http-exporter]]
  3. === HTTP exporters
  4. include::production.asciidoc[tag=monitoring-rec]
  5. The `http` exporter is the preferred exporter in the {es} {monitor-features}
  6. because it enables the use of a separate monitoring cluster. As a secondary
  7. benefit, it avoids using a production cluster node as a coordinating node for
  8. indexing monitoring data because all requests are HTTP requests to the
  9. monitoring cluster.
  10. The `http` exporter uses the low-level {es} REST Client, which enables it to
  11. send its data to any {es} cluster it can access through the network. Its requests
  12. make use of the <<common-options-response-filtering,`filter_path`>> parameter to
  13. reduce bandwidth whenever possible, which helps to ensure that communications
  14. between the production and monitoring clusters are as lightweight as possible.
  15. The `http` exporter supports a number of settings that control how it
  16. communicates over HTTP to remote clusters. In most cases, it is not
  17. necessary to explicitly configure these settings. For detailed
  18. descriptions, see <<monitoring-settings>>.
  19. [source,yaml]
  20. ----------------------------------
  21. xpack.monitoring.exporters:
  22. my_local: <1>
  23. type: local
  24. my_remote: <2>
  25. type: http
  26. host: [ "10.1.2.3:9200", ... ] <3>
  27. auth: <4>
  28. username: my_username
  29. # "xpack.monitoring.exporters.my_remote.auth.secure_password" must be set in the keystore
  30. connection:
  31. timeout: 6s
  32. read_timeout: 60s
  33. ssl: ... <5>
  34. proxy:
  35. base_path: /some/base/path <6>
  36. headers: <7>
  37. My-Proxy-Header: abc123
  38. My-Other-Thing: [ def456, ... ]
  39. index.name.time_format: YYYY-MM <8>
  40. ----------------------------------
  41. <1> A `local` exporter defined explicitly whose arbitrary name is `my_local`.
  42. <2> An `http` exporter defined whose arbitrary name is `my_remote`. This name
  43. uniquely defines the exporter but is otherwise unused.
  44. <3> `host` is a required setting for `http` exporters. It must specify the HTTP
  45. port rather than the transport port. The default port value is `9200`.
  46. <4> User authentication for those using {stack} {security-features} or some other
  47. form of user authentication protecting the cluster.
  48. <5> See <<http-exporter-settings>> for all TLS/SSL settings. If not supplied,
  49. the default node-level TLS/SSL settings are used.
  50. <6> Optional base path to prefix any outgoing request with in order to
  51. work with proxies.
  52. <7> Arbitrary key/value pairs to define as headers to send with every request.
  53. The array-based key/value format sends one header per value.
  54. <8> A mechanism for changing the date suffix used by default.
  55. NOTE: The `http` exporter accepts an array of `hosts` and it will round robin
  56. through the list. It is a good idea to take advantage of that feature when the
  57. monitoring cluster contains more than one node.
  58. Unlike the `local` exporter, _every_ node that uses the `http` exporter attempts
  59. to check and create the resources that it needs. The `http` exporter avoids
  60. re-checking the resources unless something triggers it to perform the checks
  61. again. These triggers include:
  62. * The production cluster's node restarts.
  63. * A connection failure to the monitoring cluster.
  64. * The license on the production cluster changes.
  65. * The `http` exporter is dynamically updated (and it is therefore replaced).
  66. The easiest way to trigger a check is to disable, then re-enable the exporter.
  67. WARNING: This resource management behavior can create a hole for users that
  68. delete monitoring resources. Since the `http` exporter does not re-check its
  69. resources unless one of the triggers occurs, this can result in malformed index
  70. mappings.
  71. Unlike the `local` exporter, the `http` exporter is inherently routing requests
  72. outside of the cluster. This situation means that the exporter must provide a
  73. username and password when the monitoring cluster requires one (or other
  74. appropriate security configurations, such as TLS/SSL settings).
  75. IMPORTANT: When discussing security relative to the `http` exporter, it is
  76. critical to remember that all users are managed on the monitoring cluster. This
  77. is particularly important to remember when you move from development
  78. environments to production environments, where you often have dedicated
  79. monitoring clusters.
  80. For more information about the configuration options for the `http` exporter,
  81. see <<http-exporter-settings>>.