I am actually getting below error while saving the watcher for the second time. It was saving the watcher for the first time. I think the password is converted as "es_radicated". is it because of that?
This error usually happens when Elasticsearch cannot parse a specific field in the message attachment. It would be best to double-check that your data format is correct for your authentication parameters.
Thanks for following up, @surya_dadi_dhamarake. I hadn't seen authentication in a watcher in this way for a watcher in the past, but I am a bit newer to working with Elastic. Can you provide further context as to what you want to accomplish?
Does your environment use OIDC? If your environment uses OIDC or another authentication mechanism, you may need to adjust this accordingly. An option, if this is the case, is using an API key.
A few other ideas:
Since this is a parsing error, you may want to check that your JSON is structured properly, too.
You also may want to double check your username and password are correct.
I think that the problem is that you have to retype your email password every time you save it. Otherwise Kibana does just send in ::es_redacted:: as the password. The problem is that Elasticsearch redacts that password before ever sending it to Kibana. So Kibana can't substitute back in the real password.
But even first time after I save with the actual password the action is failing with the same reason.
Oh I had read this: I am actually getting below error while saving the watcher for the second time as that the initial watch creation (with the real password) succeeded, and the second time saving (with ::es_redacted::) failed. It must be saving at least once if you're ever seeing ::es_redacted::. So you're saying you save it once with the correct password, then you view it in kibana, change ::es_redacted:: to the correct password, save a second time, and you get failed to parse field [auth]? I tried your watch in kibana doing that, and was able to successfully save twice.
I am using elastic cloud 8.9.0. Can you please check? I am still getting the error not sure why is it coming like that but I have disabled basic auth in kibana config also in elastic cloud while integrating the saml.
So you only saved the watch the one time, and never gave ::es-redacted:: as the password? That means my theory is not correct. Can you create the watch via the Elasticsearch API directly (either through dev tools in kibana or through curl from the command line) and post the response here?
How did you create it in dev tools? Are there any error messages are in the elasticsearch log when it tries to run the watch? If not, take a look in the watcher history index with something like the following to see what is going on:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.