Signals add node filtering

Hi,
I need help with adding node filter to signals settings.
I tried this from Kibana devtools
PUT /_signals/tenant._main.node_filter
“signals:true”

and get

PUT /_signals/tenant.admin_tenant.node_filter

{
“error” : “Incorrect HTTP method for uri [/_signals/tenant.admin_tenant.node_filter?pretty=true] and method [PUT], allowed: [POST]”,
“status” : 405
}

br,
Mariusz

The path component settings is missing here. Try PUT /_signals/settings/tenant.admin_tenant.node_filter

I try an now i get

{
“status” : 400,
“error” : “‘tenant.admin_tenant.node_filter’: No content to map due to end-of-input\n at [Source: (String)”"; line: 1, column: 0]",
“detail” : {
“tenant.admin_tenant.node_filter” : [
{
“error” : “No content to map due to end-of-input\n at [Source: (String)”"; line: 1, column: 0]"
}
]
}
}

What tool do you use to do the requests? If you use curl or another command line tool, can you please give the whole command line? If you use another tool, can you please give the whole configuration?

Before i try from Kibana Devtools. Now i from curl and it works
curl -k -u xxxx -XPUT “https://xxxxxx:9200/_signals/settings/tenant.admin_tenant.node_filter

And have

{“active”:“true”,“tenant”:{“admin_tenant”:{“active”:“true”,“node_filter”:""},"_main":{“active”:“true”},“signals”:{“active”:“true”}}}

How can I add filter for node.attr.signals:true?
br,
MW

You have to specify the value in the body of the request. With curl, you can do it with the -c option. For example:

curl -k -u xxxx -H "Content-Type: application/json" -XPUT “https://xxxxxx:9200/_signals/settings/tenant.admin_tenant.node_filter” -c '"signals:true"'

(Note that '"signals:true"' is written first in single quotes and then in double quotes because the shell strips the single quotes)

First i delete it
curl -k -u xxxx -XDELETE “xxxx:9200/_signals/settings/tenant.admin_tenant.node_filter”

and then

curl -k -u xxxx -XPUT “https://xxxx:9200/_signals/settings/tenant.admin_tenant.node_filter” -c ‘“signals:true”’
{“result”:“updated”}

and is still like that

{“active”:“true”,“tenant”:{“admin_tenant”:{“active”:“true”,“node_filter”:""},"_main":{“active”:“true”},“signals”:{“active”:“true”}}}

Any idea :slight_smile:

This work for me
curl -k -u xxxx -XPUT “xxxx:9200/_signals/settings/tenant.admin_tenant.node_filter” -H ‘Content-Type: application/json’ -d ‘“signals:true”’

Now i have
{“active”:“true”,“tenant”:{“admin_tenant”:{“active”:“true”,“node_filter”:“signals:true”},"_main":{“active”:“true”},“signals”:{“active”:“true”}}}

So as I understood from documentation watchers will be schedule only on node with “node.attr.signals: true” ?

br,
MW

Yes, indeed, exactly.