# Web hook \["scheme": "https"\]

**URL:** <https://discuss.elastic.co/t/web-hook-scheme-https/156392>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-alerting\
**Created:** [November 13, 2018, 6:42am UTC](https://discuss.elastic.co/t/web-hook-scheme-https/156392 "2018-11-13T06:42:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![antianchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antianchi/32/37565_2.png) [@antianchi](https://discuss.elastic.co/u/antianchi)\
**Post date:** [November 13, 2018, 6:42am UTC](https://discuss.elastic.co/t/web-hook-scheme-https/156392/1 "2018-11-13T06:42:45Z")

</div>

**this is my webhook action conf:**  
{  
"trigger": {  
"schedule": {  
"interval": "30s"  
}  
},  
"input": {  
"search": {  
"request": {  
"search\_type": "query\_then\_fetch",  
"indices": [  
"metricbeat\*"  
],  
"types": ,  
"body": {  
"size": 0,  
"query": {  
"match\_all": {}  
}  
}  
}  
}  
},  
"condition": {  
"compare": {  
"ctx.payload.hits.total": {  
"gte": 10  
}  
}  
},  
"actions": {  
"my-webhook-action": {  
"transform": {  
"script": {  
"source": "return ['msgtype' : 'text','text' : ['content' : '我就是我，不一样的烟火' + ctx.payload.hits],'at' : ['isAtAll' : true]]",  
"lang": "painless"  
}  
},  
"webhook": {  
"scheme": "https",  
"host": "[oapi.dingtalk.com](http://oapi.dingtalk.com)",  
"port": 443,  
"method": "post",  
"path": "/robot/send",  
"params": {  
"access\_token": "7e56301418a9fb58095146f165cc7adeaef20833783311111111111111111"  
},  
"headers": {},  
"body": "{{#toJson}}ctx.payload{{/toJson}}"  
}  
}  
}  
}  
**but it not work,and i got error** :

"actions": [  
{  
"id": "my-webhook-action",  
"type": "webhook",  
"status": "failure",  
"error": {  
"root\_cause": [  
{  
"type": "s\_s\_l\_handshake\_exception",  
"reason": "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"  
}  
],  
"type": "s\_s\_l\_handshake\_exception",  
"reason": "sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",  
"caused\_by": {  
"type": "validator\_exception",  
"reason": "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target",  
"caused\_by": {  
"type": "sun\_cert\_path\_builder\_exception",  
"reason": "unable to find valid certification path to requested target"  
}  
}  
}  
}  
]  
},

**_How to solve this problem?_**

---

<div class="post-metadata">

**Author:** ![antianchi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/antianchi/32/37565_2.png) [@antianchi](https://discuss.elastic.co/u/antianchi)\
**Post date:** [November 13, 2018, 7:09am UTC](https://discuss.elastic.co/t/web-hook-scheme-https/156392/2 "2018-11-13T07:09:22Z")

</div>

This is my fault.please see [Watcher TLS/SSL Settings](https://www.elastic.co/guide/en/elasticsearch/reference/6.2/notification-settings.html#ssl-notification-settings),you can got it,how https webhook can work.

---

<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:** [December 11, 2018, 7:20am UTC](https://discuss.elastic.co/t/web-hook-scheme-https/156392/3 "2018-12-11T07:20:12Z")

</div>

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