How do I filter hosts in Infrastructure Map so that I only see hosts that don’t have tag foo
?
Some hosts have tag foo:bar
and others foo:baz
. Other hosts don’t have the tag set at all. Those are the hosts I want to target.
If you set “group by” in the upper right and choose “foo”, it should create a group in the results that says “ungrouped”
Or you can use !foo
in the host search bar
Right, that works. But let’s say I want to create a monitor that targets those without a tag?
I’m assuming the filters are the same whether it’s a monitor or infra–but correct me if I’m wrong.
In the monitor its different. You would say !foo:*
there
!foo
does not filter anything.
Oh really? I thought filter syntaxes are universal. TIL…
The infrastructure list is a bit different because of the additional searching capabilities on things that aren’t tags
Gotcha. Well incidentally, !foo:*
got me what I needed for my monitor–so thanks!
Still kinda curious how to filter that in infra view, though. Grouping by foo
works as you say, but I still can’t see how to show only hosts with no foo
tag.
Hmmm, I did it in my account. I did group by “foo” then searched for !foo
and it only showed the ungrouped
group
So that works in Infrastructure List but not Map. So I guess the map is the odd one.
Ah yeah the host map is another weird one, I can’t seem to get it working there either
My usual workflow when creating a monitor is to establish a query/filter in infra map to nail down the hosts I want to target, then copy/paste that to the monitor. I guess I should be sure to use the infra list when doing that.
I would use quick graph or a dashboard, since the metric queries carry over 1:1