I do not see why is working for threshold but not for custom query (Does they have a different mechanism for quering)?
Yes, they do have different mechanisms. The threshold one is an aggregation and it does not fill in all the values when it creates a signal.
So, some good news is that in the soon to be released 7.10.0 where we improved error handling you will begin to see errors on that rule where before you were not. I just test ran that sample document off of Kibana master and here is the error:
Which has a conflict with the signal mapping. host has to be an object with inner objects/attributes as outlined here:
Once you fix that and re-index your data it should work. If it doesn't we can look at your mapping and data again. When the soon to be released 7.10.0 ships you will be able to see these error messages so getting these problems fixed sooner will be easier.
You can see the signals mapping here if it helps to find conflicts:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.