X-pack watcher


(Dhiraj Singh Chauhan) #1

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.


(Mark Walkom) #2

There is no error in your post?


(Dhiraj Singh Chauhan) #3

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


(Mark Walkom) #4

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


(Dhiraj Singh Chauhan) #5

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


(Alexander Reelsen) #6

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


(Dhiraj Singh Chauhan) #7

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


(Alexander Reelsen) #8

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


(Dhiraj Singh Chauhan) #9

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.


(Alexander Reelsen) #10

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


(Dhiraj Singh Chauhan) #11

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.


(Alexander Reelsen) #12

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


(system) #13

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