I installed reporting module on our Icinga2 monitoring system, so I would be able to generate some SLA report for one of our client which has a lot of servers. I installed the module and wanted to make the filter so that the report would be generated only for hosts with “example” string in hostname.
In Icinga2 documentation, this is done simply with match function, like this:
match("*example*",host.name)
This gave me error:
Invalid filter "match("*example*",host.name)", unexpected ( at pos 6 (Parser.php:561)
#0 /usr/share/icinga-php/ipl/vendor/ipl/web/src/Filter/Parser.php(285): ipl\Web\Filter\Parser->parseError()
#1 /usr/share/icinga-php/ipl/vendor/ipl/web/src/Filter/Parser.php(88): ipl\Web\Filter\Parser->readFilters()
#2 /usr/share/icinga-php/ipl/vendor/ipl/web/src/Filter/QueryString.php(44): ipl\Web\Filter\Parser->parse()
...
I also tried “host.name=*example*” with empty response.
To do this properly, you must create your filter like below and it should work:
host.name~*example*
Recent Comments