Hello Elastic Users,
I am trying to check if my Elasticsearch is working fine or not by running the following command in WindowsPowershell.
Invoke-RestMethod http://localhost:9200
But it threw an 401-Authentication error. I am not sure how to pass on the credentials along with Invoke Command in Powershell.
<
PS C:\Users\hussshe> Invoke-RestMethod http://localhost:9200
Invoke-RestMethod : {"error":{"root_cause":[{"type":"security_exception","reason":"missing authentication credentials
for REST request [/]","header":{"WWW-Authenticate":"Basic realm="security"
charset="UTF-8""}}],"type":"security_exception","reason":"missing authentication credentials for REST request
[/]","header":{"WWW-Authenticate":"Basic realm="security" charset="UTF-8""}},"status":401}
At line:1 char:1
- Invoke-RestMethod http://localhost:9200
-
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebExc eption + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
/>
P.S: I am a beginner trying to learn ELK on my own.
Any help would be appreciated.