Use fact=value
to search for nodes where fact
equals value
.
To search for structured facts use dots between each part of the fact path, for example
foo.bar=baz
.
Resources can be matched using the syntax type[title]{param=value}
.
The part in brackets is optional. You can also specify ~
before the title
to do a regexp match on the title. Type names and class names are case insensitive.
A resource can be preceded by @@
to match exported resources, the default is to only
match "local" resources.
Strings can contain letters, numbers or the characters :-_ without needing to be quoted. If they contain any other characters they need to be quoted with single or double quotes. Use backslash (\) to escape quotes within a quoted string or double backslash for backslashes.
An unquoted number or the strings true/false will be interpreted as numbers and boolean values, use quotation marks around them to search for them as strings instead.
A @
sign before a string causes it to be interpreted as a date parsed with
timespec.
For example @"now - 2 hours"
.
A #
sign can be used to do a subquery, against the nodes endpoint for example to
query the report-timestamp
, catalog-timestamp
or facts-timestamp
fields. For example #node.report-timestamp < @"now - 2 hours"
.
A subquery using the #
sign can have a block of expressions instead of a single
expression. For example #node { report-timestamp > @"now - 4 hours" and
report-timestamp < @"now - 2 hours" }
A bare string without comparison operator will be treated as a regexp match against the certname.
= | Equality |
!= | Not equal |
~ | Regexp match |
!~ | Not regexp match |
< | Less than |
<= | Less than or equal |
> | Greater than |
>= | Greater than or equal |
not | (unary op) |
and | |
or |
Shown in precedence order from highest to lowest. Use parenthesis to change order in an expression.