Is there an example on how use the obm policy parameters for objects to create a list of values?

Hello,

I would like to try to filter filesystems using the Sys_FileSystemUtilizationMonitor policy and I was wondering if there any known examples of how to update the %%Disk_Instance%% parameter for values in a list format? For example, I would like to filter the policy to create a condition that applies to the following filesystems:


/boot
/opt/app
/home
/var/log
/var/tmp

So far I have a regular expression that uses the comma as the field separator: \/boot,\/opt\/app,\/home,\/var\/log,\/var\/tmp

There seems to be multiple options...i.e. updating the Disk_Instance parameter or listing the file systems where the object is configured. Since there is a field separator option, I couldn't tell if that applies to the policy variable or only when you list the objects directly in the policy. The policy parameter only has <*> as the value and I was wondering if it were possible to use that in a list format.

I looked through the measurement policy and pattern matching documentation, but I still wasn't sure on how to possibly list items...

docs.microfocus.com/.../OmptMeasurementThresholdhtml


Sorry for the silly question. Any advise would be most appreciated!

Thanks,

Kia

OBM 2023.05

  • 0  

    Hello,

    I don't think this is a silly question!  I think it's really good.  I don't know the answer.

    https://docs.microfocus.com/doc/Operations_Bridge_Manager/2023.05/OmptMeasurementThresholdhtml suggests:

    "if VB Script or Perl Script is selected, select Filter using object name pattern if you want to use a pattern matching string to match the instance (or instances) for which you want to write specific rules. You must specify the pattern in the Object name matches field. Alternatively, select Filter using script and type a VB Script or Perl Script that filters the object instances. 
    For a VB Script, set Rule.Status = True if the object instance matches the condition. Otherwise set Rule.Status = False.
    For a Perl Script, set $Rule->Status(TRUE); if the object instance matches the condition. Otherwise set $Rule->Status(FALSE);."

    So there are two methods - object name and filter script.

    And the pattern matching is described here:

    https://docs.microfocus.com/doc/Operations_Bridge_Manager/2023.05/PatternMatchingDetailshtml

    So I tested using a logfile policy "magic bottle" which is how I always test these regular expressions to see if this works:

    ...which was:

    /boot|/opt/app|/home|/var/log|/var/tmp

    Could you please try adding this as a policy parameter:

    Sorry, but I've not had a chance to test.

    Thanks.

  • 0   in reply to   

    So I should say, this uses object name as a policy parameter containing /boot|/opt/app|/home|/var/log|/var/tmp which are the file systems OR'd together.  Sorry, I was multi-tasking earlier.  Something I don't do too well....