Scope:
My intention is to read dynamical the existing CIFs attached to a host.
and ignore some of them based on a host custom var filter expression.
Those not ignored I want do monitor with a separate disk check.
I am stuck when i try to reject rows from the import source based on the filter expression. Custom var fs_ignore=’/(^\/oracle$|^\/boot$)/’
I want to use the modifier “Reject or keep rows based on property value” to filter out all rows where a filter expression from ColA matches ColB.
My regex filter expression ‘/${colA})/’, doesn`t see to catch anything.
When I filter with a static value instead of the ColA entry it perfectly works.
filter reg expression‘/(\/boot|\/oracle$)/’
Is it posible to filter a column based on a second column?
These Director Modifiers are less documented than I would like. However, I believe what you want to do is not possible.
What I understand you want to do is have Director:
read the content of a column (ColA)
interpret the value of each row as a regular expression
use that regular expression to see if the content of another column (ColB) matches
What sounds impossible to me is step 2 where an interpretation of the regular expression would have to take place. To be confirmed by the Gurus out there.
My guess is, that a new modifier would need to be added for this.
Modifiers are just hooks on a icingaweb2 module so shouldn’t be to hard to code.
But maybe it would be easier to write a script that gets the info from the Director API, massages the data in the script and dumps a perfect version for the file import source.