# Gray Log with Existing OpenSearch

**URL:** <https://community.graylog.org/t/gray-log-with-existing-opensearch/29634>\
**Category:** New to Graylog Community? READ-ME FIRST Guides\
**Created:** [July 24, 2023, 1:23am UTC](https://community.graylog.org/t/gray-log-with-existing-opensearch/29634 "2023-07-24T01:23:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohanrajnv](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/rohanrajnv/32/15223_2.png) [@rohanrajnv](https://community.graylog.org/u/rohanrajnv)\
**Post date:** [July 24, 2023, 1:23am UTC](https://community.graylog.org/t/gray-log-with-existing-opensearch/29634/1 "2023-07-24T01:23:17Z")

</div>

Hi Everyone,  
I am new to Graylog. I have installed OpenSearch, and it is working. Currently, I have configured the Elastic Flow to send the flow data to OpenSearch, and the OpenSearch Dashboard is able to display the Data.  
I was planning to configure Graylog to get logs from the Same firewall, but my installation has an issue.  
I get the following error in the log and I am unable to load the web console.  
2023-07-21T22:53:57.298Z ERROR [VersionProbe] Unable to retrieve version from Elasticsearch node: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. - unable to find valid certification path to requested target.  
2023-07-21T22:53:57.299Z INFO [VersionProbe] Elasticsearch is not available. Retry #306  
2023-07-21T22:54:02.315Z ERROR [VersionProbe] Unable to retrieve version from Elasticsearch node: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. - unable to find valid certification path to requested target.  
2023-07-21T22:54:02.315Z INFO [VersionProbe] Elasticsearch is not available. Retry #307

Opensearch is working and has no issues.  
_curl -XGET [https://192.168.49.91:9200](https://192.168.49.91:9200) -u admin:admin --insecure_  
_{_

- “name” : “OSH01”,\*
- “cluster\_name” : “opensearch”,\*
- “cluster\_uuid” : “\*\*\*\*\*”,\*
- “version” : {\*
- “distribution” : “opensearch”,\*
- “number” : “2.8.0”,\*
- “build\_type” : “deb”,\*
- “build\_hash” : "\*\*_",_
- “build\_date” : “\*\*”,\*
- “build\_snapshot” : false,\*
- “lucene\_version” : “9.6.0”,\*
- “minimum\_wire\_compatibility\_version” : “7.10.0”,\*
- “minimum\_index\_compatibility\_version” : “7.0.0”\*
- },\*
- “tagline” : “The OpenSearch Project: [https://opensearch.org/](https://opensearch.org/)”\*

_~$ curl -XGET [https://192.168.49.91:9200/\_cat/nodes?v](https://192.168.49.91:9200/_cat/nodes?v) -u admin:admin --insecure_  
_ip heap.percent ram.percent cpu load\_1m load\_5m load\_15m node.role node.roles cluster\_manager name_  
_192.168.49.91 56 96 2 0.10 0.18 0.15 dimr cluster\_manager,data,ingest,remote\_cluster\_client \* OSH01_

_~$ curl -XGET [https://192.168.49.91:9200/\_cat/indices?v](https://192.168.49.91:9200/_cat/indices?v) -u admin:admin --insecure_  
_health status index uuid pri rep docs.count docs.deleted store.size pri.store.size_  
_green open .opensearch-observability trRv1mT8R-G-FbwqHnqo0g 1 0 0 0 208b 208b_  
_green open elastiflow-flow-ecs-8.0-2.2-2023.07.21 wOTjECbUSNC9oF-Nkpj6yA 1 0 12254990 0 4.4gb 4.4gb_  
_green open .kibana\_92668751\_admin\_1 GxAoXKWFQcexCmazbK7LNQ 1 0 1291 0 394.7kb 394.7kb_  
_yellow open security-auditlog-2023.07.22 TOOLuWS3RG-\_QnWqBVJnoQ 1 1 695 0 1.4mb 1.4mb_  
_yellow open security-auditlog-2023.07.21 c-zNVmttR7uuqrtR0F6IeA 1 1 1451 0 2.8mb 2.8mb_  
_green open elastiflow-flow-ecs-8.0-2.2-2023.07.22 IeoqGfDlRaSiQk9djaJSxw 1 0 800927 0 355.3mb 355.3mb_  
_green open .opendistro\_security GY-bB775S1u\_ErGQ\_EeFfA 1 0 10 0 75.4kb 75.4kb_  
_green open .kibana\_1 S5MWlIeaT2-cfifycRlnUA 1 0 1291 0 394.7kb 394.7kb_  
_vsrsadmin@PFTEST:~$_

any guidance on how I can connect the graylog to the OpenSearch?

---

<div class="post-metadata">

**Author:** ![joe.gross](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/joe.gross/32/13372_2.png) [@joe.gross](https://community.graylog.org/u/joe.gross)\
**Post date:** [July 24, 2023, 6:55pm UTC](https://community.graylog.org/t/gray-log-with-existing-opensearch/29634/2 "2023-07-24T18:55:24Z")

</div>

Hi, @rohanrajnv.

FIrst, you don’t want to send logs directly into Opensearch. You want a fresh install of Opensearch and allow Graylog to collect and transfer all messages to Opensearch, as well as manage the retention and rotation for Opensearch indices.

The message you are seeing seems to indicate it’s looking for certificate information. I see the https in the URL, but don’t see that you’ve configured Graylog to use TLS.

> 2023-07-21T22:54:02.315Z ERROR [VersionProbe] Unable to retrieve version from Elasticsearch node: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. - unable to find valid certification path to requested target.

I also noticed these messages:

> 2023-07-21T22:53:57.299Z INFO [VersionProbe] _ **Elasticsearch is not available. Retry #306** _  
> 2023-07-21T22:54:02.315Z INFO [VersionProbe] _ **Elasticsearch is not available. Retry #307** _

Graylog can’t see Opensearch. Did you list the opensearch node in the Graylog server.conf file?

---

<div class="post-metadata">

**Author:** ![rohanrajnv](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/rohanrajnv/32/15223_2.png) [@rohanrajnv](https://community.graylog.org/u/rohanrajnv)\
**Post date:** [July 26, 2023, 4:14am UTC](https://community.graylog.org/t/gray-log-with-existing-opensearch/29634/3 "2023-07-26T04:14:08Z")

</div>

Is there anyway I can setup Graylog to not verify the certificate just like ElasticFlow?

---

<div class="post-metadata">

**Author:** ![joe.gross](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/joe.gross/32/13372_2.png) [@joe.gross](https://community.graylog.org/u/joe.gross)\
**Post date:** [July 26, 2023, 4:02pm UTC](https://community.graylog.org/t/gray-log-with-existing-opensearch/29634/4 "2023-07-26T16:02:42Z")

</div>

Not that I know of. If you don’t want to validate the certificate, just turn off TLS and use straight HTTP. As long as you are on the internal network, the risk should be small. You could mitigate even that risk with aggressive segmentation and ACLs.

---

<div class="post-metadata">

**Author:** ![rohanrajnv](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/rohanrajnv/32/15223_2.png) [@rohanrajnv](https://community.graylog.org/u/rohanrajnv)\
**Post date:** [August 12, 2023, 12:01pm UTC](https://community.graylog.org/t/gray-log-with-existing-opensearch/29634/5 "2023-08-12T12:01:16Z")

</div>

Thank you for your support. i managed to create a certificate.
