Multiple facts search

Is it possible to match multiple facts and show them on the same set of hosts?
For example I was to show all hosts where ipmi_address != “” and serialnumber !=""
I tried different queries, none of them worked.

(fact = serialnumber AND value ~ *) AND (fact = ipmi_ipaddress and value ~ *)


Thanks for your help

Yes, it’s as easy as facts.ipmi_ipaddress = val1 and facts.serialnumber = val2

Unfortunately, This doesn’t work. (I tried before)

What version are you running? I have tried it on fresh develop successfully.

Worth making sure that you are searching for hosts, so you should search in
the hosts page, not facts.

I’m searching for facts not hosts.

Aren’t you searching for hosts that have fact A and fact B? If not your
usage case is not clear…

Using the above examples also works for me on the Hosts page, since it does appear you want a list of hosts.

Note that searching for “fact1 == foo and fact2 == bar” cannot work on the Facts page, because the return object (a fact) can’t have both names at the same time - it’s a logical impossibility.