# Issue in elasticsearch configurations

**URL:** https://discuss.elastic.co/t/issue-in-elasticsearch-configurations/135020
**Category:** Beats
**Tags:** metricbeat
**Created:** [June 7, 2018, 2:59pm UTC](https://discuss.elastic.co/t/issue-in-elasticsearch-configurations/135020 "2018-06-07T14:59:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![riccardopierpaoli](https://avatars.discourse-cdn.com/v4/letter/r/f07891/32.png) [@riccardopierpaoli](https://discuss.elastic.co/u/riccardopierpaoli)
#### Post date: [June 7, 2018, 2:59pm UTC](https://discuss.elastic.co/t/issue-in-elasticsearch-configurations/135020/1 "2018-06-07T14:59:41Z")

</div>

Hello, I'm new in Elasticsearch x-pack plug-in and I have a problem to configure Metricbeat.  
My configuration is composed by 2 clusters: one for monitoring, compound by one node (port 9202) and one cluster for data nodes, composed by 2 nodes (ports 9201 and 9200).  
I've installed x-pack on all nodes of the clusters. The Elasticsearch and Metricbeat version is the 6.2.4.

⚫ This is my Metricbeat configurations:

`#=========== Modules configuration ===============

metricbeat.config.modules:  
path: /etc/metricbeat/modules.d/\*.yml  
reload.enabled: false  
#==================== Elasticsearch template setting ==========================

setup.template.settings:  
index.number\_of\_shards: 1  
index.codec: best\_compression  
#\_source.enabled: false

#======================== General ==============================

name: metricbeat-test-cluster

#Optional fields that you can specify to add additional information to the  
#output.  
#fields:  
env: aws-test-env  
#================= Dashboards =================  
setup.dashboards.enabled: true  
#============================ Kibana ========================

#Starting with Beats version 6.0.0, the dashboards are loaded via the Kibana API.  
#This requires a Kibana endpoint configuration.  
setup.kibana.host: "127.0.0.1:5602"  
#Kibana Host  
#Scheme and port can be left out and will be set to the default (http and 5601)  
#In case you specify and additional path, the scheme is required: [http://localhost:5601/path](http://localhost:5601/path)  
#IPv6 addresses should always be defined as: https://[2001:db8::1]:5601  
#======================= Outputs ==========================

#Configure what output to use when sending the data collected by the beat.  
#-------------------------- Elasticsearch output ------------------------------  
output.elasticsearch.hosts: ["[https://127.0.0.1:9200](https://127.0.0.1:9200)"]  
#output.elasticsearch.username: "elastic"  
#output.elasticsearch.password: "elastic"  
#output.elasticsearch.ssl.enabled: true  
#output.elasticsearch.ssl.verification\_mode: none  
#output.elasticsearch.ssl.certificate\_authorities: ["path/to/node1/pem"]  
#output.elasticsearch.ssl.certificate: "path/to/node1/pem"  
#output.elasticsearch.ssl.key: "path/to/node1/pem"  
#========================= Logging ========================

#Sets log level. The default log level is info.  
#Available log levels are: error, warning, info, debug  
logging.level: debug

#At debug level, you can selectively enable logging only for some components.  
#To enable all selectors use ["_"]. Examples of other selectors are "beat",  
#"publish", "service".  
logging.selectors: ["_"]

#==================== Xpack Monitoring ======================  
#metricbeat can export internal metrics to a central Elasticsearch monitoring  
#cluster. This requires xpack monitoring to be enabled in Elasticsearch. The  
#reporting is disabled by default.  
#Set to true to enable the monitoring reporter.  
xpack.monitoring.enabled: true

#Uncomment to send the metrics to Elasticsearch. Most settings from the  
#Elasticsearch output are accepted here as well. Any setting that is not set is  
#automatically inherited from the Elasticsearch output configuration, so if you  
#have the Elasticsearch output configured, you can simply uncomment the  
#following line.  
xpack.monitoring.elasticsearch.hosts: ["[https://127.0.0.1:9202](https://127.0.0.1:9202)"]  
xpack.monitoring.elasticsearch.username: "elastic"  
xpack.monitoring.elasticsearch.password: "elastic"  
xpack.monitoring.elasticsearch.ssl.enabled: true  
xpack.monitoring.elasticsearch.ssl.verification\_mode: none  
xpack.monitoring.elasticsearch.ssl.certificate\_authorities: ["/path/to/monitoring/pem"]  
xpack.monitoring.elasticsearch.ssl.certificate: "/path/to/monitoring/pem"  
xpack.monitoring.elasticsearch.ssl.key: "/path/to/monitoring/pem" `

⚫ When I try to start the service by using the command : "service metricbeat start", the response is:

Starting metricbeat: 2018-06-07T10:43:06.889Z INFO instance/beat.go:468 Home path: [/usr/share/metricbeat] Config path: [/etc/metricbeat] Data path: [/var/lib/metricbeat] Logs path: [/var/log/metricbeat]  
2018-06-07T10:43:06.889Z DEBUG [beat] instance/beat.go:495 Beat metadata path: /var/lib/metricbeat/meta.json  
2018-06-07T10:43:06.889Z INFO instance/beat.go:475 Beat UUID: ##########  
2018-06-07T10:43:06.889Z INFO instance/beat.go:213 Setup Beat: metricbeat; Version: 6.2.4  
2018-06-07T10:43:06.889Z DEBUG [beat] instance/beat.go:230 Initializing output plugins  
2018-06-07T10:43:06.890Z DEBUG [processors] processors/processor.go:49 Processors:  
2018-06-07T10:43:06.890Z INFO elasticsearch/client.go:145 Elasticsearch url: [https://127.0.0.1:9200](https://127.0.0.1:9200)  
2018-06-07T10:43:06.890Z INFO pipeline/module.go:76 Beat name: metricbeat-test-cluster  
2018-06-07T10:43:06.890Z DEBUG [modules] beater/metricbeat.go:80 Register [ModuleFactory:[docker, mongodb, mysql, postgresql, system, uwsgi], MetricSetFactory:[aerospike/namespace, apache/status, ceph/cluster\_disk, ceph/cluster\_health, ceph/cluster\_status, ceph/monitor\_health, ceph/osd\_df, ceph/osd\_tree, ceph/pool\_disk, couchbase/bucket, couchbase/cluster, couchbase/node, docker/container, docker/cpu, docker/diskio, docker/healthcheck, docker/image, docker/info, docker/memory, docker/network, dropwizard/collector, elasticsearch/node, elasticsearch/node\_stats, etcd/leader, etcd/self, etcd/store, golang/expvar, golang/heap, graphite/server, haproxy/info, haproxy/stat, http/json, http/server, jolokia/jmx, kafka/consumergroup, kafka/partition, kibana/status, kubernetes/container, kubernetes/event, kubernetes/node, kubernetes/pod, kubernetes/state\_container, kubernetes/state\_deployment, kubernetes/state\_node, kubernetes/state\_pod, kubernetes/state\_replicaset, kubernetes/system, kubernetes/volume, logstash/node, logstash/node\_stats, memcached/stats, mongodb/collstats, mongodb/dbstats, mongodb/status, mysql/status, nginx/stubstatus, php\_fpm/pool, postgresql/activity, postgresql/bgwriter, postgresql/database, prometheus/collector, prometheus/stats, rabbitmq/node, rabbitmq/queue, redis/info, redis/keyspace, system/core, system/cpu, system/diskio, system/filesystem, system/fsstat, system/load, system/memory, system/network, system/process, system/process\_summary, system/raid, system/socket, system/uptime, uwsgi/status, vsphere/datastore, vsphere/host, vsphere/virtualmachine, zookeeper/mntr]]  
Config OK  
[OK]

⚫ The log of metricbeat after the service starting is :

2018-06-07T10:43:06.928Z ERROR instance/beat.go:667 Exiting: 'xpack.monitoring.elasticsearch.hosts' and 'output.elasticsearch.hosts' are configured

Q1: Could you help me on this issue?  
Q2: Is it possible to store both metricbeat's indices, monitoring and metric, on monitoring node?I could sucessfully store monitoring index on monitoring node, but, of course, metricbeat index won't be seen by kibana...

Thank you!

---

<div class="post-metadata">

### Author: ![ruflin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ruflin/32/3116_2.png) [@ruflin](https://discuss.elastic.co/u/ruflin)
#### Post date: [June 15, 2018, 2:42pm UTC](https://discuss.elastic.co/t/issue-in-elasticsearch-configurations/135020/2 "2018-06-15T14:42:13Z")

</div>

If you use Elasticsearch as output you must send the metrics to the same cluster. This is a current limitation that you can't send it to the monitoring cluster directly. Should be possible in the future. So you have to remove the `hosts` config from inside xpack and let your production cluster forward the data.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 13, 2018, 2:42pm UTC](https://discuss.elastic.co/t/issue-in-elasticsearch-configurations/135020/3 "2018-07-13T14:42:16Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
