# Xpack - User unauthorized to to curl Health checks

**URL:** https://discuss.elastic.co/t/xpack-user-unauthorized-to-to-curl-health-checks/225143
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [March 26, 2020, 8:42am UTC](https://discuss.elastic.co/t/xpack-user-unauthorized-to-to-curl-health-checks/225143 "2020-03-26T08:42:57Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Moritz\_Kiesewetter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moritz_kiesewetter/32/51243_2.png) [@Moritz\_Kiesewetter](https://discuss.elastic.co/u/Moritz_Kiesewetter)
#### Post date: [March 26, 2020, 8:42am UTC](https://discuss.elastic.co/t/xpack-user-unauthorized-to-to-curl-health-checks/225143/1 "2020-03-26T08:42:57Z")

</div>

Hello guys,  
i succesfully setup Xpack in my ELK-Cluster - now i have to get my monitoring to no throw any errors when checking

> /\_cluster/health?pretty

So i added a user called "checkmk" with the following command:

`bin/elasticsearch-users useradd checkmk -p XXXXXXX -r monitoring_user,kibana_admin`

I used the built-in roles from elasticsearch - i thought this might do it's thing - but everytime i try to authenticate with the user (after i restarted elasticsearch) i get the following error:

`{"error":{"root_cause":[{"type":"security_exception","reason":"action [cluster:monitor/state] is unauthorized for user [checkmk]"}],"type":"security_exception","reason":"action [cluster:monitor/state] is unauthorized for user [checkmk]"},"status":403}[`

Does anybody know what priviliges i have to grant the user to check this? I would not like to give him 'superuser' role.

I'm using ELK v 7.6 and i have not configured any roles on my own by now.

Thanks in advance!

---

<div class="post-metadata">

### Author: ![Magnus\_Kessler](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnus_kessler/32/42001_2.png) [@Magnus\_Kessler](https://discuss.elastic.co/u/Magnus_Kessler)
#### Post date: [March 26, 2020, 9:04am UTC](https://discuss.elastic.co/t/xpack-user-unauthorized-to-to-curl-health-checks/225143/2 "2020-03-26T09:04:12Z")

</div>

You'll have to assign the built-in [`remote_monitoring_collector` role](https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-roles.html) to your `checkmk` user, or create a custom role with at least the `monitor` cluster privilege.

---

<div class="post-metadata">

### Author: ![Moritz\_Kiesewetter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/moritz_kiesewetter/32/51243_2.png) [@Moritz\_Kiesewetter](https://discuss.elastic.co/u/Moritz_Kiesewetter)
#### Post date: [March 26, 2020, 9:21am UTC](https://discuss.elastic.co/t/xpack-user-unauthorized-to-to-curl-health-checks/225143/3 "2020-03-26T09:21:55Z")

</div>

Thanks for the fast solution!

---

<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: [April 23, 2020, 9:21am UTC](https://discuss.elastic.co/t/xpack-user-unauthorized-to-to-curl-health-checks/225143/4 "2020-04-23T09:21:56Z")

</div>

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