monitoring/filter/objects role unable to set

This forum was archived to /woltlab and is now in read-only mode.
  • Hello All,


    I'm trying to set this filter on a role:


    monitoring/filter/objects : host_name!=myserver.mydomain.com


    This works(user with this role cant see myserver.mydomain.com . But if I set:


    host_name!=myserver.mydomain.com AND host_name!=*ZZZ*


    nothing works (with no error), user is able to see everything (all hosts)


    Where can I find the right syntax to use? I need to set this filter:


    host_name!=myserver.mydomain.com AND host_name!=*ZZZ* AND service_name !=dummy


    thanks for your help,


    Regards






  • Pipe is like AND? I though pipe was like OR and so that's not what I need: With the filter you suggested, I can still see hosts with host_name like *ZZZ* and I can still see myserver.mydomain.com !

  • Looking at the documentation it should be "||" or "&&", depending on your needs.

    This is the documentation for Icinga 2, the question here is Icinga Web 2 related. So I guess the Icinga Web 2 doc fits better here :)


    Read through the security chapter of the Icinga Web 2 documentation, especially the Filter Expressions chapter.

    https://www.icinga.com/docs/ic…b2/latest/doc/06-Security

  • Yes, it is icingaweb2 related but the link given explain the right syntax to use for apply rules, which seems to be same: "||" or "&&" is the right syntax to do OR/AND.

  • Whoops, sorry. I thought so far that Icinga Web 2 uses "&" for an AND expression and "|" for an OR expression, but I just tried using the expressions "&&" and "||" and it works. So Wolfgang solution works. So far I created the filter in the Overview tab and just copied them to the Authentication tab filter.