# Does Elasticsearch-7.x have any api for getting/setting jvm.options and log4j2.properties?

**URL:** <https://discuss.elastic.co/t/does-elasticsearch-7-x-have-any-api-for-getting-setting-jvm-options-and-log4j2-properties/181635>\
**Category:** Elasticsearch\
**Created:** [May 17, 2019, 6:43pm UTC](https://discuss.elastic.co/t/does-elasticsearch-7-x-have-any-api-for-getting-setting-jvm-options-and-log4j2-properties/181635 "2019-05-17T18:43:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![cool\_guy99](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cool_guy99/32/46406_2.png) [@cool\_guy99](https://discuss.elastic.co/u/cool_guy99)\
**Post date:** [May 17, 2019, 6:43pm UTC](https://discuss.elastic.co/t/does-elasticsearch-7-x-have-any-api-for-getting-setting-jvm-options-and-log4j2-properties/181635/1 "2019-05-17T18:43:59Z")

</div>

Does Elasticsearch-7.x have any api for getting/setting jvm.options and log4j2.properties?  
I'm looking to check if there is a way to directly set or atleast get the jvm.options and log4j2.properties file information via a direct api call.

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [May 18, 2019, 4:17pm UTC](https://discuss.elastic.co/t/does-elasticsearch-7-x-have-any-api-for-getting-setting-jvm-options-and-log4j2-properties/181635/2 "2019-05-18T16:17:51Z")

</div>

There is not a way to get the log4j2.properties via any Elasticsearch APIs. For the jvm.options, you can not directly get the contents of this file, but you can see all the JVM options used to start the JVM via `GET /_nodes/jvm` (look at `input_arguments`). Note that this might include options that are not in the jvm.options (e.g., it also includes JVM options set via `ES_JAVA_OPTS`). Neither of these are available to set via any APIs.

---

<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:** [June 15, 2019, 4:27pm UTC](https://discuss.elastic.co/t/does-elasticsearch-7-x-have-any-api-for-getting-setting-jvm-options-and-log4j2-properties/181635/3 "2019-06-15T16:27:36Z")

</div>

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