|
| 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 | +% TBD - not sure if this is totally accurate |
| 16 | +% {{ece}} clusters running on ECE only support connections over **HTTP/HTTPS** through the RESTful API. Direct connections to the transport port are not supported. |
| 17 | + |
| 18 | +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). |
| 19 | + |
| 20 | +## Connect using the endpoint URL [ece-connect-endpoint] |
| 21 | + |
| 22 | +To connect to your {{es}} cluster, copy the **{{es}} endpoint** from the deployment page in the [Cloud UI](./log-into-cloud-ui.md). |
| 23 | + |
| 24 | +::::{important} |
| 25 | +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). |
| 26 | +:::: |
| 27 | + |
| 28 | +Once you have the endpoint, use it in your client application. To test connectivity, you can: |
| 29 | +* Open the endpoint in your browser and enter authentication details when prompted. |
| 30 | +* Modify the following `curl` example to fit your environment by replacing the URL and proxy CA certificate with your own values. |
| 31 | + |
| 32 | + ```sh |
| 33 | + curl --cacert /path/to/elastic-ece-ca-cert.pem -u elastic https://f76e96da2a7f4d3f8f3ee25d686b879c.HOST-IP-ADDRESS.ip.es.io:9243 |
| 34 | + { |
| 35 | + "name" : "instance-0000000000", |
| 36 | + "cluster_name" : "f76e96da2a7f4d3f8f3ee25d686b879c", |
| 37 | + "cluster_uuid" : "w2SXqdACQCy5AAixXRxeXg", |
| 38 | + "version" : { |
| 39 | + "number" : "8.17.3", |
| 40 | + "build_flavor" : "default", |
| 41 | + "build_type" : "docker", |
| 42 | + "build_hash" : "a091390de485bd4b127884f7e565c0cad59b10d2", |
| 43 | + "build_date" : "2025-02-28T10:07:26.089129809Z", |
| 44 | + "build_snapshot" : false, |
| 45 | + "lucene_version" : "9.12.0", |
| 46 | + "minimum_wire_compatibility_version" : "7.17.0", |
| 47 | + "minimum_index_compatibility_version" : "7.0.0" |
| 48 | + }, |
| 49 | + "tagline" : "You Know, for Search" |
| 50 | + } |
| 51 | + ``` |
| 52 | + |
| 53 | + 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). |
| 54 | + |
| 55 | + ::::{note} |
| 56 | + When connecting to {{es}}, you can use one of the following ports: |
| 57 | + * Port 9243 – Secure HTTPS (**recommended**). |
| 58 | + * Port 9200 – Plaintext HTTP (**not recommended**). |
| 59 | + :::: |
| 60 | + |
| 61 | +## Connect using Cloud ID [ece-cloud-id] |
| 62 | + |
| 63 | +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, by assigning a unique ID to your cluster. |
| 64 | + |
| 65 | +::::{note} |
| 66 | +Connections through Cloud IDs are only supported in Beats and Logstash. |
| 67 | +:::: |
| 68 | + |
| 69 | + |
| 70 | +Cloud IDs are available in every deployment page, as showed below: |
| 71 | + |
| 72 | +:::{image} ../../../images/cloud-enterprise-ec-ce-cloud-id.png |
| 73 | +:alt: The Cloud ID and `elastic` user information shown when you create a deployment |
| 74 | +::: |
| 75 | + |
| 76 | +Include this ID along with your user credentials (defined in `cloud.auth`) in your Beat or Logstash configuration. ECE will handle the remaining connection details, ensuring secure data transfer to your hosted cluster. |
| 77 | + |
| 78 | +### Before you begin [ece_before_you_begin_16] |
| 79 | + |
| 80 | +To use the Cloud ID, you need: |
| 81 | + |
| 82 | +* A deployment with an {{es}} cluster to send data to. |
| 83 | +* Beats or Logstash, installed locally wherever you want to send data from. |
| 84 | +* To configure Beats or Logstash, you need: |
| 85 | + * The unique Cloud ID for your deployment, available from the deployment overview page. |
| 86 | + * A user ID and password that has permission to send data to your {{es}} cluster. |
| 87 | + |
| 88 | +::::{important} |
| 89 | + 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. |
| 90 | +:::: |
| 91 | + |
| 92 | +### Example: Configure Beats with your Cloud ID [ece-cloud-id-beats] |
| 93 | + |
| 94 | +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. |
| 95 | + |
| 96 | +::::{tip} |
| 97 | +For others, you can learn more about [getting started](asciidocalypse://docs/beats/docs/reference/index.md) with each Beat. |
| 98 | +:::: |
| 99 | + |
| 100 | +To get started with Metricbeat and {{ece}}: |
| 101 | + |
| 102 | +1. [Log into the Cloud UI](log-into-cloud-ui.md). |
| 103 | +2. [Create a new deployment](create-deployment.md) and copy down the password for the `elastic` user. |
| 104 | +3. On the deployment overview page, copy down the Cloud ID. |
| 105 | +4. Set up the Beat of your choice, such as [Metricbeat](asciidocalypse://docs/beats/docs/reference/metricbeat/metricbeat-installation-configuration.md). |
| 106 | +5. [Configure the Beat output to send to Elastic Cloud](asciidocalypse://docs/beats/docs/reference/metricbeat/configure-cloud-id.md). |
| 107 | + |
| 108 | + ::::{note} |
| 109 | + Make sure you replace the values for `cloud.id` and `cloud.auth` with your own information. |
| 110 | + :::: |
| 111 | + |
| 112 | +6. Open Kibana and explore! |
| 113 | + |
| 114 | +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