2017-11-02 12:25:10 -04:00
|
|
|
[role="xpack"]
|
2018-06-22 18:39:34 -04:00
|
|
|
[testenv="basic"]
|
2017-11-02 12:25:10 -04:00
|
|
|
[[http-exporter]]
|
2019-09-24 13:35:06 -04:00
|
|
|
=== HTTP exporters
|
2017-11-02 12:25:10 -04:00
|
|
|
|
2019-12-02 16:31:47 -05:00
|
|
|
[IMPORTANT]
|
|
|
|
=========================
|
|
|
|
{metricbeat} is the recommended method for collecting and shipping monitoring
|
|
|
|
data to a monitoring cluster.
|
2017-11-02 12:25:10 -04:00
|
|
|
|
2020-06-11 13:16:53 -04:00
|
|
|
If you have previously configured legacy collection methods, you should migrate
|
|
|
|
to using {metricbeat} collection methods. Use either {metricbeat} collection or
|
|
|
|
legacy collection methods; do not use both.
|
2019-12-02 16:31:47 -05:00
|
|
|
|
|
|
|
Learn more about <<configuring-metricbeat>>.
|
|
|
|
=========================
|
|
|
|
|
|
|
|
The `http` exporter is the preferred exporter in the {es} {monitor-features}
|
|
|
|
because it enables the use of a separate monitoring cluster. As a secondary
|
|
|
|
benefit, it avoids using a production cluster node as a coordinating node for
|
|
|
|
indexing monitoring data because all requests are HTTP requests to the
|
|
|
|
monitoring cluster.
|
|
|
|
|
|
|
|
The `http` exporter uses the low-level {es} REST Client, which enables it to
|
|
|
|
send its data to any {es} cluster it can access through the network. Its requests
|
|
|
|
make use of the <<common-options-response-filtering,`filter_path`>> parameter to
|
|
|
|
reduce bandwidth whenever possible, which helps to ensure that communications
|
|
|
|
between the production and monitoring clusters are as lightweight as possible.
|
2017-11-02 12:25:10 -04:00
|
|
|
|
|
|
|
The `http` exporter supports a number of settings that control how it
|
|
|
|
communicates over HTTP to remote clusters. In most cases, it is not
|
|
|
|
necessary to explicitly configure these settings. For detailed
|
2018-04-16 17:57:42 -04:00
|
|
|
descriptions, see <<monitoring-settings>>.
|
2017-11-02 12:25:10 -04:00
|
|
|
|
|
|
|
[source,yaml]
|
|
|
|
----------------------------------
|
|
|
|
xpack.monitoring.exporters:
|
|
|
|
my_local: <1>
|
|
|
|
type: local
|
|
|
|
my_remote: <2>
|
|
|
|
type: http
|
2018-04-16 17:57:42 -04:00
|
|
|
host: [ "10.1.2.3:9200", ... ] <3>
|
2017-11-02 12:25:10 -04:00
|
|
|
auth: <4>
|
|
|
|
username: my_username
|
|
|
|
password: changeme
|
|
|
|
connection:
|
|
|
|
timeout: 6s
|
|
|
|
read_timeout: 60s
|
|
|
|
ssl: ... <5>
|
|
|
|
proxy:
|
|
|
|
base_path: /some/base/path <6>
|
|
|
|
headers: <7>
|
|
|
|
My-Proxy-Header: abc123
|
|
|
|
My-Other-Thing: [ def456, ... ]
|
|
|
|
index.name.time_format: YYYY-MM <8>
|
|
|
|
|
|
|
|
----------------------------------
|
|
|
|
<1> A `local` exporter defined explicitly whose arbitrary name is `my_local`.
|
2019-12-02 16:31:47 -05:00
|
|
|
<2> An `http` exporter defined whose arbitrary name is `my_remote`. This name
|
|
|
|
uniquely defines the exporter but is otherwise unused.
|
|
|
|
<3> `host` is a required setting for `http` exporters. It must specify the HTTP
|
|
|
|
port rather than the transport port. The default port value is `9200`.
|
2018-12-19 17:53:37 -05:00
|
|
|
<4> User authentication for those using {stack} {security-features} or some other
|
2017-11-02 12:25:10 -04:00
|
|
|
form of user authentication protecting the cluster.
|
2019-12-02 16:31:47 -05:00
|
|
|
<5> See <<http-exporter-settings>> for all TLS/SSL settings. If not supplied,
|
2018-04-16 17:57:42 -04:00
|
|
|
the default node-level TLS/SSL settings are used.
|
2017-11-02 12:25:10 -04:00
|
|
|
<6> Optional base path to prefix any outgoing request with in order to
|
|
|
|
work with proxies.
|
|
|
|
<7> Arbitrary key/value pairs to define as headers to send with every request.
|
|
|
|
The array-based key/value format sends one header per value.
|
|
|
|
<8> A mechanism for changing the date suffix used by default.
|
2018-04-16 17:57:42 -04:00
|
|
|
|
2019-12-02 16:31:47 -05:00
|
|
|
NOTE: The `http` exporter accepts an array of `hosts` and it will round robin
|
|
|
|
through the list. It is a good idea to take advantage of that feature when the
|
2018-04-16 17:57:42 -04:00
|
|
|
monitoring cluster contains more than one node.
|
|
|
|
|
|
|
|
Unlike the `local` exporter, _every_ node that uses the `http` exporter attempts
|
2019-12-02 16:31:47 -05:00
|
|
|
to check and create the resources that it needs. The `http` exporter avoids
|
|
|
|
re-checking the resources unless something triggers it to perform the checks
|
2018-04-16 17:57:42 -04:00
|
|
|
again. These triggers include:
|
|
|
|
|
|
|
|
* The production cluster's node restarts.
|
|
|
|
* A connection failure to the monitoring cluster.
|
|
|
|
* The license on the production cluster changes.
|
|
|
|
* The `http` exporter is dynamically updated (and it is therefore replaced).
|
|
|
|
|
|
|
|
The easiest way to trigger a check is to disable, then re-enable the exporter.
|
|
|
|
|
2019-12-02 16:31:47 -05:00
|
|
|
WARNING: This resource management behavior can create a hole for users that
|
|
|
|
delete monitoring resources. Since the `http` exporter does not re-check its
|
|
|
|
resources unless one of the triggers occurs, this can result in malformed index
|
2018-04-16 17:57:42 -04:00
|
|
|
mappings.
|
|
|
|
|
|
|
|
Unlike the `local` exporter, the `http` exporter is inherently routing requests
|
2019-12-02 16:31:47 -05:00
|
|
|
outside of the cluster. This situation means that the exporter must provide a
|
|
|
|
username and password when the monitoring cluster requires one (or other
|
2018-04-16 17:57:42 -04:00
|
|
|
appropriate security configurations, such as TLS/SSL settings).
|
|
|
|
|
|
|
|
IMPORTANT: When discussing security relative to the `http` exporter, it is
|
2019-12-02 16:31:47 -05:00
|
|
|
critical to remember that all users are managed on the monitoring cluster. This
|
|
|
|
is particularly important to remember when you move from development
|
|
|
|
environments to production environments, where you often have dedicated
|
2018-04-16 17:57:42 -04:00
|
|
|
monitoring clusters.
|
|
|
|
|
2019-12-02 16:31:47 -05:00
|
|
|
For more information about the configuration options for the `http` exporter,
|
2018-04-16 17:57:42 -04:00
|
|
|
see <<http-exporter-settings>>.
|