I'm trying to create a kibana watcher for alerting purpose. I need help how i can create a table inside kibana watcher and add the relevant fields in it.
Below is my watcher json
{
"trigger": {
"schedule": {
"interval": "1m"
}
},
"input": {
"search": {
"request": {
"search_type": "query_then_fetch",
"indices": [
"mi-services-loader-*",
"logs"
],
"rest_total_hits_as_int": true,
"body": {
"size": 50,
"query": {
"bool": {
"must": [
{
"query_string": {
"query": """Application.Name:("InstnAUMCelsus_Int") AND Context.Properties.message:("Exception occured in InstnAUMCelcus Loader while preparing data for KeyInstn")"""
}
}
],
"filter": [
{
"range": {
"@timestamp": {
"from": "now-1h",
"to": "now"
}
}
}
]
}
}
}
}
}
},
"condition": {
"compare": {
"ctx.payload.hits.total": {
"gte": 1
}
}
},
"actions": {
"send_email": {
"throttle_period_in_millis": 3600000,
"email": {
"profile": "standard",
"to": [
"maheen.ali@spglobal.com"
],
"subject": "Development - AUM: Data Discrepancy| Date {{ctx.trigger.scheduled_time}}|InstnAUMCelsus Loader|Application ID: 938",
"body": {
"text": "Alert Details: {{ctx.payload.hits.total}} hits found."
}
}
}
}
}
and table which i want to create is
Column1 Column2 Column3 Column4 Column5
data data data data data
data data data data data
data data data data data
data data data data data
data data data data data