Hi,
I want to send the elasticsearch monitoring data to a separate monitoring cluster. Both the cluster have Elasticsearch 5.2.0. In the actual cluster, in elasticsearch.yml I added the following configuration. Note: Password is changed for security reasons.
xpack.monitoring.exporters:
id1:
type: http
host: 10.2.29.182:9200
auth:
username: elastic
password: xyz
GET request to monitoring cluster is working using the same credentails. Even kibana access to monitoring cluster is working with the credentials, where as when monitoring data is being sent to monitoring cluster, HTTP Code 401
, Unauthorized is being returned. See below for more details.
curl -v -u elastic:xyz -XGET 'http://10.2.29.182:9200/_xpack/security/user/remote_monitor?pretty'
- About to connect() to 10.2.29.182 port 9200 (#0)
- Trying 10.2.29.182...
- Connected to 10.2.29.182 (10.2.29.182) port 9200 (#0)
- Server auth using Basic with user 'elastic'
GET /_xpack/security/user/remote_monitor?pretty HTTP/1.1
User-Agent: curl/7.29.0
Host: 10.2.29.182:9200
Accept: /
< HTTP/1.1 200 OK
< Content-Type: application/json; charset=UTF-8
< Content-Length: 242
< Connection: keep-alive
<
{
"remote_monitor" : {
"username" : "remote_monitor",
"roles" : [
"remote_monitoring_agent"
],
"full_name" : "Internal Agent For Remote Monitoring",
"email" : null,
"metadata" : { },
"enabled" : true
}
}
This error is being printed every 10 sec in the main cluster which tried to send logs.
[2017-07-31T12:29:21,698][INFO ][o.e.x.m.e.Exporters ] [2YC2PWt] skipping exporter [id1] as it is not ready yet
[2017-07-31T12:29:31,742][ERROR][o.e.x.m.e.h.VersionHttpResource] failed to verify minimum version [5.0.0-beta1] on the [xpack.monitoring.exporters.id1] monitoring cluster
org.elasticsearch.client.ResponseException: GET http://10.2.29.182:9200/?filter_path=version.number: HTTP/1.1 401 Unauthorized
{"error":{"root_cause":[{"type":"security_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}}],"type":"security_exception","reason":"failed to authenticate user [elastic]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}
Can anyone point out what is going wrong here?
Update: 5.5.0 returned 404 for several URL's. Some of them are below. Ofcourse, I didn't configure any templates since default monitoring is also not working for me. Is it mandatory to configure templates as mentioned in https://www.elastic.co/guide/en/x-pack/current/configuring-monitoring.html
Host: 10.2.29.182:9200
Request: GET HTTP/1.1 (252 B)
URI: /_ingest/pipeline/xpack_monitoring_6 ? filter_path=.version
/_template/.monitoring-alerts-2 ? filter_path=.version
/_template/.monitoring-kibana ? filter_path=*.version
Regards,
Sindhura