# How do I access the configuration settings from within opensearch

**URL:** <https://forum.opensearch.org/t/how-do-i-access-the-configuration-settings-from-within-opensearch/19522>\
**Category:** OpenSearch\
**Tags:** discuss, troubleshoot\
**Created:** [May 23, 2024, 4:39pm UTC](https://forum.opensearch.org/t/how-do-i-access-the-configuration-settings-from-within-opensearch/19522 "2024-05-23T16:39:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CarolynR](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@CarolynR](https://forum.opensearch.org/u/CarolynR)\
**Post date:** [May 23, 2024, 4:39pm UTC](https://forum.opensearch.org/t/how-do-i-access-the-configuration-settings-from-within-opensearch/19522/1 "2024-05-23T16:39:25Z")

</div>

**Versions** (relevant - OpenSearch/Dashboard/Server OS/Browser):  
Opensearch 2.11.1

**Describe the issue** :  
I am coding a custom notification channel to be used by the alerting plugin. In the message body send to the destination, I want to include a link back to opensearch and the query used to generate the alert.  
To do this, I need the current hostname and port that opensearch is currently using.

Within opensearch, how do I get its hostname and port?

**Configuration** :  
Opensearch is running in a container

**Relevant Logs or Screenshots** :

---

<div class="post-metadata">

**Author:** ![gaobinlong](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/gaobinlong/32/5242_2.png) [@gaobinlong](https://forum.opensearch.org/u/gaobinlong)\
**Post date:** [May 24, 2024, 5:33am UTC](https://forum.opensearch.org/t/how-do-i-access-the-configuration-settings-from-within-opensearch/19522/2 "2024-05-24T05:33:45Z")

</div>

You can call the nodes API to get the public address of each node:

```auto
GET _nodes/http

```

, but the nodeIP:port may not be accessed directly if there’s a proxy in front of your cluster, so how about create an index in your cluster to record the endpoint of your cluster?

---

<div class="post-metadata">

**Author:** ![CarolynR](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@CarolynR](https://forum.opensearch.org/u/CarolynR)\
**Post date:** [May 24, 2024, 2:28pm UTC](https://forum.opensearch.org/t/how-do-i-access-the-configuration-settings-from-within-opensearch/19522/3 "2024-05-24T14:28:20Z")

</div>

Yes, I see that the host address is available in this command but I really need something that would allow me to pull the values configured in the opensearch.yml file. My basic need is for the host and port, but I will eventually also need configured values that define the keystore filename and password. Is there no interface that provides this?

I am doing this from java in the notifications plugin backend code.
