Closed matthenning closed 5 years ago
I can confirm this. My filter: Result:
see my response in the other duplicate issue here - https://github.com/Icinga/icingaweb2-module-elasticsearch/issues/26 You'll want to change your mapping type on your index to "keyword" for the hostname, or try using the .keyword type in your query. - eg fields.host_name.keyword={host.name}
Duplicate of #26
Expected Behavior
If the host name contains a minus (-) character I only receive results for this host when querying elasticsearch like this:
fields.host_name={host.name}
hostname: `demo-host.local'Current Behavior
I receive results for all
fields.host_name
containingdemo
orhost.local
Possible Solution
Wrap the {host.name} in double quotes when translating to elasticsearch query
Steps to Reproduce (for bugs)
Compare the results of the lucene queries
fields.host_name:demo-host.local
andfields.host_name:"demo-host.local"
Your Environment
icinga2 --version
): 2.8.4curl http://localhost:9200
): 5.6