Configuring Watcher with basic-auth and Elastic Cloud


(Ivan Brusic) #1

Working on an Elastic Cloud project that I did not set up myself. Configuring a watch using an HTTP input back to itself. I am missing something incredibly basic since I get 404s. Using the same 'elastic' user used for our HTTP calls and Kibana access.

PUT _xpack/watcher/watch/_execute

{

"watch": {

"trigger": {

"schedule": {

"interval": "60s"

}

},

"input": {

"http": {

"request": {

"scheme": "https",

"host": "xxx.found.io",

"port": 9243,

"path": "/_node/stats",

"auth": {

"basic": {

"username": "elastic",

"password": "xxx"

}

}

}

}

}

}

}

A more complete 404 error: https://gist.github.com/brusic/bcb54acef23ddec26149a381c1f1edec

Also attempted to use a full url to no avail:

{

"request": {

"url": "https://elastic:password@XXX.found.io:9243/_node/stats",

}

}

Once again, obviously missing something basic, which I am assuming it on the admin side of things. HTTP calls work perfectly.

Cheers,

Ivan


(Alexander Reelsen) #2

Please format the watch in markdown which makes it a hundred times easier to read the next time :slight_smile:

The watch setup looks ok to me. One thing that stands out is the fact that you try to access elasticsearch node stats but the response in the gist is showing that you connected to kibana. Was that intentional?


(Ivan Brusic) #3

As I said, I knew it was something incredibly basic. Wrong domain. Duh. Silly copy and paste error. Walks away in shame.

My email was properly formatted when sent, it is the mailing list software that might have stripped out characters. My email client does not support markdown. :slight_smile:

Thanks,

Ivan


(system) #4

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