I am trying to add new user in elastic search . I have am able to add user with superuser role and perform operation but i am able to add user but when i tried to to use that user to access cluster data I am getting bellow error.
{"error":{"root_cause":[{"type":"security_exception","reason":"action [cluster:monitor/main] is unauthorized for user [user_readonly]"}],"type":"security_exception","reason":"action [cluster:monitor/main] is unauthorized for user [user_readonly]"},"status":403}
I have used file bases authentication. I have used 'bin/x-pack/users useradd user_readonly -p test@123 -r monitorning_user' command