|
| 1 | +--- |
| 2 | +navigation_title: Connect to Elasticsearch |
| 3 | +applies_to: |
| 4 | + deployment: |
| 5 | + ece: all |
| 6 | +mapped_pages: |
| 7 | + - https://www.elastic.co/guide/en/cloud-enterprise/current/ece-cloud-id.html |
| 8 | + - https://www.elastic.co/guide/en/cloud-enterprise/current/ece-connect.html |
| 9 | +--- |
| 10 | + |
| 11 | +# Connect to Elasticsearch [ece-connect] |
| 12 | + |
| 13 | +This section explains how to connect client applications to an {{es}} deployment running on ECE. You can use the [endpoint URL](#ece-connect-endpoint) available in the deployment UI, or the [Cloud ID](#ece-cloud-id) for a simplified setup with compatible clients such as Beats and Logstash. |
| 14 | + |
| 15 | +{{ece}} clusters running on ECE only support connections over **HTTP/HTTPS** through the RESTful API. Direct connections to the transport port are not supported. |
| 16 | + |
| 17 | +To successfully connect to a deployment, you need both the connection details and valid authentication credentials for an authorized user in the target deployment. For more details on authentication and authorization mechanisms in ECE, refer to [Users and roles](../../users-roles.md#orchestrator-level). |
| 18 | + |
| 19 | +## Connect Using the Endpoint URL [ece-connect-endpoint] |
| 20 | + |
| 21 | +To connect to your {{es}} cluster, copy the **{{es}} endpoint** from the deployment page in the [Cloud UI](./log-into-cloud-ui.md). |
| 22 | + |
| 23 | +::::{important} |
| 24 | +Application endpoints in ECE are generated based on the domain name configured in **Platform > Settings**. To learn how to modify these endpoints, refer to [Change endpoint URLs](./change-endpoint-urls.md). |
| 25 | +:::: |
| 26 | + |
| 27 | +Once you have the endpoint, use it in your client application. To test connectivity, open the endpoint in your browser or modify the following `curl` example to fit your environment by replacing the URL and proxy CA certificate with your own values. |
| 28 | + |
| 29 | +```sh |
| 30 | +curl --cacert /path/to/elastic-ece-ca-cert.pem -u elastic https://f76e96da2a7f4d3f8f3ee25d686b879c.HOST-IP-ADDRESS.ip.es.io:9243 |
| 31 | +{ |
| 32 | + "name" : "instance-0000000000", |
| 33 | + "cluster_name" : "f76e96da2a7f4d3f8f3ee25d686b879c", |
| 34 | + "cluster_uuid" : "w2SXqdACQCy5AAixXRxeXg", |
| 35 | + "version" : { |
| 36 | + "number" : "8.17.3", |
| 37 | + "build_flavor" : "default", |
| 38 | + "build_type" : "docker", |
| 39 | + "build_hash" : "a091390de485bd4b127884f7e565c0cad59b10d2", |
| 40 | + "build_date" : "2025-02-28T10:07:26.089129809Z", |
| 41 | + "build_snapshot" : false, |
| 42 | + "lucene_version" : "9.12.0", |
| 43 | + "minimum_wire_compatibility_version" : "7.17.0", |
| 44 | + "minimum_index_compatibility_version" : "7.0.0" |
| 45 | + }, |
| 46 | + "tagline" : "You Know, for Search" |
| 47 | +} |
| 48 | +``` |
| 49 | + |
| 50 | +The previous example authenticates to the cluster using the default `elastic` user. For more information on authentication and authorization in {{es}}, refer to [](../../users-roles.md). |
| 51 | + |
| 52 | +::::{note} |
| 53 | +When connecting to {{es}}, you can use one of the following ports: |
| 54 | +* Port 9243 – Secure HTTPS (**recommended**). |
| 55 | +* Port 9200 – Plaintext HTTP (**not recommended**). |
| 56 | +:::: |
| 57 | + |
| 58 | +## Connect using Cloud ID [ece-cloud-id] |
| 59 | + |
| 60 | +The Cloud ID reduces the number of steps required to start sending data from [Beats](https://www.elastic.co/guide/en/beats/libbeat/current/index.html) or [Logstash](https://www.elastic.co/guide/en/logstash/current/index.html) to your hosted {{es}} cluster on {{ece}}. It works by assigning a unique ID to your hosted {{es}} cluster on {{ece}}. All deployments automatically get a Cloud ID. |
| 61 | + |
| 62 | +You include your Cloud ID along with your user credentials (defined in `cloud.auth`) when you run Beats or Logstash locally, and then let {{ece}} handle all of the remaining connection details to send the data to your hosted cluster on {{ece}} safely and securely. |
| 63 | + |
| 64 | +::::{note} |
| 65 | +For information about beats or logstash refer to xxxx |
| 66 | +:::: |
| 67 | + |
| 68 | +### Before you begin [ece_before_you_begin_16] |
| 69 | + |
| 70 | +To use the Cloud ID, you need: |
| 71 | + |
| 72 | +* A deployment with an {{es}} cluster to send data to. |
| 73 | +* Beats or Logstash, installed locally wherever you want to send data from. |
| 74 | +* To configure Beats or Logstash, you need: |
| 75 | + * The unique Cloud ID for your deployment, available from the deployment overview page. |
| 76 | + * A user ID and password that has permission to send data to your {{es}} cluster. |
| 77 | + |
| 78 | +::::{important} |
| 79 | + In our examples, we use the `elastic` superuser that every {{es}} cluster comes with. The password for the `elastic` user is provided when you create a deployment (and can also be [reset](../../users-roles/cluster-or-deployment-auth/built-in-users.md) if you forget it). On a production system, you should adapt these examples by creating a user that can write to and access only the minimally required indices. For each Beat, review the specific feature and role table, similar to the one in [Metricbeat](asciidocalypse://docs/beats/docs/reference/metricbeat/feature-roles.md) documentation. |
| 80 | +:::: |
| 81 | + |
| 82 | +### Configure Beats with your Cloud ID [ece-cloud-id-beats] |
| 83 | + |
| 84 | +The following example shows how you can send operational data from Metricbeat to a new {{ece}} deployment by using the Cloud ID. While this example uses Metricbeat, the same approach applies to other Beats. |
| 85 | + |
| 86 | +::::{tip} |
| 87 | +For others, you can learn more about [getting started](asciidocalypse://docs/beats/docs/reference/index.md) with each Beat. |
| 88 | +:::: |
| 89 | + |
| 90 | +To get started with Metricbeat and {{ece}}: |
| 91 | + |
| 92 | +1. [Log into the Cloud UI](log-into-cloud-ui.md). |
| 93 | +2. [Create a new deployment](create-deployment.md) and copy down the password for the `elastic` user. |
| 94 | +3. On the deployment overview page, copy down the Cloud ID. |
| 95 | +4. Set up the Beat of your choice, such as [Metricbeat](asciidocalypse://docs/beats/docs/reference/metricbeat/metricbeat-installation-configuration.md). |
| 96 | +5. [Configure the Beat output to send to Elastic Cloud](asciidocalypse://docs/beats/docs/reference/metricbeat/configure-cloud-id.md). |
| 97 | + |
| 98 | + ::::{note} |
| 99 | + Make sure you replace the values for `cloud.id` and `cloud.auth` with your own information. |
| 100 | + :::: |
| 101 | + |
| 102 | +6. Open Kibana and explore! |
| 103 | + |
| 104 | +Metricbeat creates a data view (formerly *index pattern*) with defined fields, searches, visualizations, and dashboards that you can start exploring in Kibana. Look for information related to system metrics, such as CPU usage, utilization rates for memory and disk, and details for processes. |
0 commit comments