# Password field gets deleted after adding a watch

**URL:** <https://discuss.elastic.co/t/password-field-gets-deleted-after-adding-a-watch/88178>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [June 4, 2017, 9:27am UTC](https://discuss.elastic.co/t/password-field-gets-deleted-after-adding-a-watch/88178 "2017-06-04T09:27:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![azelezni](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@azelezni](https://discuss.elastic.co/u/azelezni)\
**Post date:** [June 4, 2017, 9:27am UTC](https://discuss.elastic.co/t/password-field-gets-deleted-after-adding-a-watch/88178/1 "2017-06-04T09:27:06Z")

</div>

Hello, I've been trying to add a new watcher that will email a report to multiple users, however after I've added the watch (either via web UI or curl) and try to run it, I get the following error "password is a required option".  
Looking at the watch after I've inserted it I noticed the password filed is gone (under email attachment).  
I've also tried to edit the watch via web UI after adding it, and after I hit 'save' the password is gone again.

Here is my watch:  
{  
"trigger" : {  
"schedule": {  
"interval": "1h"  
}  
},  
"actions" : {  
"email\_user" : {  
"email": {  
"to": "alex@some\_mail.com",  
"subject": "Some Report",  
"attachments" : {  
"report.pdf" : {  
"reporting" : {  
"url": "[http://0.0.0.0:5601/api/reporting/generate/dashboard/some\_report?\_g=(time:(from:now-30d%2Fd,mode:quick,to:now)](http://0.0.0.0:5601/api/reporting/generate/dashboard/some_report?_g=(time:(from:now-30d%2Fd,mode:quick,to:now)))",  
"retries":6,  
"interval":"1s",  
"auth":{  
"basic":{  
"username":"some\_user",  
"password":"some\_pass"  
}  
}  
}  
}  
}  
}  
}  
}  
}

And here the watch after I've added it to elastic:  
{  
"trigger": {  
"schedule": {  
"interval": "1h"  
}  
},  
"input": {  
"none": {}  
},  
"condition": {  
"always": {}  
},  
"actions": {  
"email\_user": {  
"email": {  
"profile": "standard",  
"attachments": {  
"report.pdf": {  
"reporting": {  
"url": "[http://0.0.0.0:5601/api/reporting/generate/dashboard/some\_report?\_g=(time:(from:now-30d%2Fd,mode:quick,to:now)](http://0.0.0.0:5601/api/reporting/generate/dashboard/some_report?_g=(time:(from:now-30d%2Fd,mode:quick,to:now)))",  
"retries": 6,  
"interval": "1s",  
"auth": {  
"basic": {  
"username": "some\_user"  
}  
}  
}  
}  
},  
"to": [  
"alex@some\_mail.com"  
],  
"subject": "Some Report"  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [June 8, 2017, 7:39am UTC](https://discuss.elastic.co/t/password-field-gets-deleted-after-adding-a-watch/88178/2 "2017-06-08T07:39:07Z")

</div>

Hey,

the password is not gone, it is omitted due to security reasons.

If you still have issues adding a new watch (apparently it was successful, otherwise you cannot get it back), please copy and paste the full request/response in here.

Also take some time for formatting, so this is easier to read. Thanks!

--Alex

---

<div class="post-metadata">

**Author:** ![azelezni](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@azelezni](https://discuss.elastic.co/u/azelezni)\
**Post date:** [June 20, 2017, 5:49am UTC](https://discuss.elastic.co/t/password-field-gets-deleted-after-adding-a-watch/88178/3 "2017-06-20T05:49:23Z")

</div>

Hey spinscale.  
Yes I figured the passwords were removed for security reasons, and the watcher will work when executing from the API or on a schedule.  
However, if I create a new watcher and save it, then edit it again and try to execute it from the web UI I'll the the following error: "Watcher: [parse\_exception] password is a required option".

---

<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:** [July 18, 2017, 5:49am UTC](https://discuss.elastic.co/t/password-field-gets-deleted-after-adding-a-watch/88178/4 "2017-07-18T05:49:54Z")

</div>

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