Web hook ["scheme": "https"]

alerting

(Antianchi) #1

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",
"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?


(Antianchi) #2

This is my fault.please see Watcher TLS/SSL Settings,you can got it,how https webhook can work.