Werk #561: Quicksearch: now able to search with multiple filters

Component GUI
Title Quicksearch: now able to search with multiple filters
Date Feb 26, 2014
Checkmk Editon Checkmk Raw (CRE)
Checkmk Version 1.2.5i1
Level Prominent Change
Class New Feature
Compatibility Compatible - no manual interaction needed

The classical quicksearch allowed certain filter prefixes, which specified the item to look for. For example:

  • h: {search_text} # Find hostname, host_address or hostalias
  • s: {search_text} # Find service
  • hg: {search_text} # Find hostgroup
  • sg: {search_text} # Find servicegroup

The new search feature enhances the service search.
You can now combine these filters to thin out the results.
For example:

s: mem h: localhost

This will search for all services containing mem on the localhost. Furthermore you can combine these filters.

s: mem s: cpu h: localhost h: switch-intern

This will search for all services containing mem OR cpu on the hosts localhost OR switch-intern. The search algorhytm is as follow:

  • Same filters are combined with OR
  • Different filters are combined with AND

The query

h: localhost s: mem s: cpu h:switch-intern

actually results in the following livestatus query:

GET services
Cache: reload
Columns: service_description host_name hostgroups servicegroups
Filter: host_name ~~ switch-intern
Filter: host_name ~~ localhost
Or: 2
Filter: service_description ~~ cpu
Filter: service_description ~~ mem
Or: 2
And: 2
Limit: 80

You can also add the hg: and sg: filters to the query.
Note: Right now, this multisearch filter only works if at least one of the filters is a service ( s: ).

To the list of all Werks