X-pack watcher

Hi Guys,

I am creating a new x-pack watcher to trigger a email when condition met. but while executing the create api through Kibana console I am getting below error. Please help me to create new watcher.
"No handler found for uri [/_xpack/watcher/watch/healthStatus] and method [PUT]"

Appreciate your help in advance.

There is no error in your post?

Sorry I missed to post error. I have updated mt post with error msg.

Please show the entire Watch. What version of the Elastic Stack are you running?

I am using ELK version 5.5.0

PUT _xpack/watcher/watch/healthStatus
{
"trigger" : {
"schedule" : { "interval" : "1m" }
},
"input" : {
"http" : {
"request" : {
"host" : "XXXXXXXXXX",
"port" : XXXX,
"path" : "/_cluster/health"
}
}
},
"condition" : {
"compare" : {
"ctx.payload.status" : { "eq" : "green" }
}
},
"actions" : {
"send_email" : {
"email" : {
"to" : "XXXXXXX@XXXXXXXX",
"subject" : "Elastic Search Health Green",
"body" : "Elastic Search Health Green"
}
}
}
}

I am able to create watch by ising same API in my local system. But does not on prod env

It looks as if the x-pack plugin is not installed.

Can you check with GET _cat/plugins and paste the full output here

--Alex

Hi Alex,

I have installed x-pack plugin.

XXXXXXXXXX x-pack 5.5.0
XXXXXXXXXX x-pack 5.5.0
XXXXXXXXXX x-pack 5.5.0
XXXXXXXXXX x-pack 5.5.0
XXXXXXXXXX x-pack 5.5.0
XXXXXXXXXX x-pack 5.5.0
XXXXXXXXXX x-pack 5.5.0

please share the exact output of the PUT watch action, also share the output of GET _nodes

Hi Alex,

This is the output of the PUT watch action
"No handler found for uri [/_xpack/watcher/watch/healthStatus] and method [PUT]".

Sorry Alex, GET _nodes output has full infra details. I can't provide the our infrastructure details on open forum.

you can use the filter_path=**.xpack param to only show xpack specific parameters, that might help.

1 Like

Thanks Alex,

By executing API( GET _nodes?filter_path=**.xpack) I got the reason why I was not able to create watcher.
Its due to, watcher is disable in my elasticsearch.yml file.

Glad you got it sorted out! And thanks for also posting the solution, always helpful for others.

1 Like

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