Wildcard in the rule Condition

Hello

I'm trying to code a condition in the rule ability to file alarm system for the particular file systems.  I will define a particular server in the definition of the rule for the rule brought to a server and I'll add code similar to the following:

checkDiskName = scope.get ("name")

subjectName = null

Switch (checkDiskName) {}

"F:\\ExchangeLog1" - case: subjectName = "high Disk Alert - invoke Standby."
break;
"F:\\ExchangeLog2" - case: subjectName = "high Disk Alert - invoke Standby."
break;
"F:\\ExchangeMaintLog" - case: subjectName = "high Disk Alert - invoke Standby."
break;

default: subjectName = "high Disk Alert.

}

subjectName return

(The foregoing has been truncated.)

In other words, if the particular drive space is part of the privileged few, issues have a reminder in the subject line that the person keep must be awake, but for other drives, let him sleep.

As you can see, it would be better to have a wildcard to do this, similar to:

"F:\\Exchange*" - case: subjectName = "high Disk Alert - invoke Standby."
break;

default: subjectName = "high Disk Alert.

This will match all the varieties like F:\\ExchangeLog5 and F:\\ExchangeMaintLog.  (For your information, the file systems appear within Foglight like F:\ExchangeLog3 etc.).

Is this possible?

Thanks in advance

Brian

Hello

I would use a simple if-then-else here, but you can also use a regex in a switch

Switch (checkDiskName) {}

case ~ / F:\\Exchange.*/: 'high drive alert - call Standby' break;

default: subjectName = "low"; break;

}

See you soon

Nils

Tags: Dell Tech

Similar Questions

  • No match rule conditions

    I'm relatively new to the Oracle Policy Manager (3 months now) and I have an interesting situation. The application of rules is designed with a procedure of initiation that gathers data for the instance of the event and calls the DBMS_RLMGR. Procedure PROCESS_RULES in a loop. We have developed this application in our development environment and it works without problem. In the development environment, it evaluates the data through the rule conditions and executes the callback procedures when it should. We recently deployed it to our QA environment and it does not work as expected. We have deployed the same classes of rule under the same conditions and load the same data in the tables of the source, as well. We then performed the procedures for opening and no action (by recall procedures) have been performed for the rule classes. I checked that the initiation procedures are data collection and calling the DBMS_RLMGR. Procedure PROCESS_RULES as expected. I even ran track for the session, but it is relatively complex to interpret with calls to the procedural code of internal rule Manager. The database version is 11g.

    Hello

    Could you please check if the rules in the production environment are all turned on? You can query the rlm$ activated column of the table of class rule. You can also set up a dummy, which corresponds to each event and see if it fires. If not, make sure that the implementation of callback procedure is correct. If none of these work, you can try the ADD_EVENTS API to add events and query the view of results of rule class. This way, you will know if the error is in the callback procedure or rules.

    Hope this helps,
    -Aravind.

  • Wildcards in rule conditions

    I have several virtual machines that I know will never get VMware tools installed, so I want to remove them from the alarm. I managed to get the rule work if I add ' | '. (scope.get ("name") is "LXACS001") "the condition of" VMW Machine virtual VMware Tools. However, I don't really want to set up 4 different conditions to the IF statement. Someone can you please tell me how I can use a wildcard character (or there may be a better way to do)? I want something like: ' | ' (scope.get ("name") '% LXACS') ».
    Thank you!!

    in your field of application of the rule, you could do the following:
    VMWVirtualMachine where name! like '% LXACS '.
    -Larry

  • Can we have another condition to the rule set (business rules)

    can we have condition ifElse in the set of rules?


    Thank you

    There is no IfElse in the rule set.

    If you require an If else, write 2 different rules:
    (1) with the positive test condition.
    (2) with the negative test condition.

    Oracle Business Rules follow Pattern Matching, Rete algorithm, not mistake for a procedural language built IfElse.

    --
    Mark recognition appropriate as useful or appropriate response, if your problem is resolved.

  • How to limit the rules (CPU usage) doesn't include a few servers (IP)

    Hello

    There are few servers who always raised processor and we do not generate alerts for servers, but we need to get the statistics of CPU in the FMS, is there a way I can limit the rules (i.e., the CPU utilization) to not stand for these servers.

    Thank you

    Shashank Soni.

    Hello

    You can change the definition of the rule to exclude certain hosts.

    In this example, we add a condition by saying that the does not apply to a specific host, or hosts.
    Note that you may need to replace the name of the property with the property that designates the host name.

    You can also check the host name in the status itself

    Another option you have is to find the variable being compared and it scope (give it a very high value for specific hosts.

    I hope this helps.

    Golan

  • How to exclude from the SOUL of the rules if the invoice distribution amount is < 0 (i.e. the negative amount) to the existing rule

    How to exclude from the SOUL of the rules if the invoice distribution amount is < 0 (i.e. the negative amount) to the existing rule.

    Requirement: I have an obligation to send the invoice approval group approval specified when the invoice distribution account is 4567 and charge the amount of distribution > 0

    Finished configurations:

    1. Set condition: the string value to using 4567 supplier_invoice_distribution_gl_account attribute
    2. The condition set: SUPPLIER_INVOICE_DISTRIBUTION_AMOUNT is greater than or equal to 0
    3. Definition of new rule setting the terms of the 1st and 2nd stage and also group attached to this rule approval

    Note: Approval is not required is defined for invoices IN. matched in SOUL.

    Test case:

    1. Corresponding invoice with PO (PO amount is 8000)
    2. Amount of invoice header 5000
    3. Distribution account invoice 5568 as well as the amount is 8000
    4. Inserted 4567 distribution and quantity is - 3000

    Behavior of real: system sends the approval of the Bill for approval related group account 4567

    Expected behavior: invoice approval status should be 'Not necessary', since it is a corresponding purchase order invoice and 4567 account amount is < 0

    Kindly let me know how to set the rule to exclude the ve - amount distribution associated with lines

    Hello

    Then set a rule all 3 conditions:

    If attribute SUPPLIER_INVOICE_DISTRIBUTION_PO_MATCHED = No. and the SUPPLIER_INVOICE_DISTRIBUTION_AMOUNT attribute is less than the 0 attribute and supplier_invoice_distribution_account = <> then no permission.

    Concerning

    Yvette

  • Adding to the rule of file system capacity

    Hello

    The ability of current file system rule resembles the current % used and compared to a registry variable.   My team of storage request that I change the rule.  They wanted to be able to specify a more granuilar % as 99.5% for criticism or 99.2% for warnring (for specific disc) it's because these drives are very large.  However, it seems that the default metric is supported only integers... .such as 99%.

    That said my next idea was to change the alert rule that if the player was at 99% and had to say less than 1 GB of space... for example.  In this way, he would not be a problem for smaller and larger discs would have a second check.  However I don't know how to change the condition to achieve this result.  That's what brings me to yall.   Thanks for any help in advance

    Here is the current status for the warning

    test = true;

    for {(obj in scope.detail)

    If (obj.topologyTypeName.equals ("AccessInformation")) {}

    test = obj.writable;

    }

    }

    If {(test)

    return #capacityUsed # > = registry ("INF_FileSystemCapacityWarning");

    }

    Returns false;

    You can create your own registry variables and make double whole vs. and those who use instead.  With respect to the addition in the available space, you could manually set or use a registry variable.  There is space in MB.

    test = true;

    for {(obj in scope.detail)

    If (obj.topologyTypeName.equals ("AccessInformation")) {}

    test = obj.writable;

    }

    }

    If {(test)

    return #capacityUsed # > = registry ("INF_FileSystemCapacityWarning") & #spaceAvailable #.<=>

    }

    Returns false;

  • The rule of definition - shouldn't this work

    I'm crazy, please let me know if this should work, when I validate the condition that I continue to find the server. I don't want the ProcessorUtilization to draw on this server. This is the condition

    Windows_System_Processor_Table where monitoredHost.name! = ' xxxx*. XXXX.com'

    RegEx is a topic worthy of study, but if your condition is "configure the scope application of a rule so that the rule does not apply to a specific host", then you don't need RegEx.

    Also, it is worth noting that any copy-and-customize you made to the rules of inheritance cartridge OS will need to be redone when you migrate to the cartridge of the Infrastructure. If you have FMS 5.6 or more, you may be able to save time and effort of host migration ' exclude from the scope ' agent Windows Infrastructure rather sooner than later.

    Kind regards

    Brian Wheeldon

  • Can set the default value in the field with the rule

    I have a rule to set the xWebStartDate to dateCurrent(), but it does not work. I disabled all other rules, so there is no conflict. This rule is only to try to fix the date of xWebStart, nothing else.
    'Use the activation of rule condition' is checked. I selected 'Action of use' and 'check in Selected. I have added the xWebStartDate field and I have a default custom
    < $dprDefaultValue dateCurrent () = $ >
    Thus, it is for content that already exists and someone is to check in a new revision.
    I know that my rule works, because I added the dDocAuthor field and set it to "infOnly" and that works. This problem occurs if the action is updated also. But for check-ins again, I put the xWebStartDate to dateCurrent successfully.

    Update: it's existing content, which already has a xWebStartDate. The rule must replace the existing value.

    Edited by: ironarm February 1, 2013 17:58

    In your case, you cannot use default value for the new revisions, because your content is already a value for the metadata field.

    Alternative:
    (1) change your rule
    (2) on the general tab, check "Use activation Condition rule" and click Edit
    (3) in 'Edit Activation Condition' window, click on the tab "side effects".
    (4) add the following...

    <$if isCheckin $> [[%or you can also use (IdcService and IdcService like "CHECKIN_SEL_FORM")%]]
        <$xWebStartDate=dateCurrent()$>
    <$endif$>
    
  • Force evaluation of the rules for the non-existent entities and unknown attributes...

    Hi all

    I have another issue potentially easy for the gurus of the OPA in this forum - there must be a simple explanation to this question but I'm just not see it.

    The problem that I am having with several of my rules, it's that the conclusion is not evaluated due to the non-existent entity instances or unknown entity attributes. As an example of the first scenario, I have a rule that checks for the existence of an instance of an entity with a type and status. The conclusion is evaluated as if there is at least an instance of this entity, otherwise, the conclusion remains unknown.

    Similarly, I wrote an equation to annualize all its (financial) obligations in a case, where the frequency of the obligation can be weekly, fortnightly, monthly, etc.. I created an attribute for each type of frequency, which are then added to the equation. The issue in this example, is that the equation does not conclude if there is not a value for each attribute in the equation. For example, if:

    assign 1 = A + B + C

    where A = 1, B = 2 and C is unknown, does not examine the attribute from 1 to 3, but will remain unknown. Logically, I expect that the lack of a digital defaults to 0, and rather unknown attribute value, but this is not the case.

    I looked at the 'Certain and known operator rule examples' help topic to try to understand how assign a value to an unknown attribute, but the example at the bottom of the topic page does not provide a sufficient explanation as to how the logic:

    point of the total team = team 1 round points + points of the round 2 team + team of turn 3 points

    the team of the round 1 points = 0 if
    Round 1 team points (such as recorded by the team) is unknown

    the team from round 2 points = 0 if
    etc.

    It seems from the example that there are 2 attributes used to the same variable: [team of the Tower, 1 points] and [team of the round 1 points (such as recorded by the team)]. It is not clear to me how the original equation can be concluded if the values are stored in the alternate attribute [points of the round 1 team (such as recorded by the team)] etc.

    I have also considered using fragments of rule by the help topic "Prove an attribute using multiple rules", while I could use two equations separated to set the value of an attribute according to the circumstances, that is to say:

    assign 1 = A + B + C

    1 = 0 if attribute
    attribute 1 is unknown

    This attempt results in a logic loop error, probably because I am trying to set the value of an attribute based on the same attribute value.

    Any help will be greatly appreciated!
    Philippe

    Hi Philippe,.

    I suggest the following way to solve this problem, although there are other ways too.
    You can use a table of rules for it.

    Open a Working Document, and then press 'Alt + Z' created a rules table.

    Use the following rule: -.
    Keep the text in bold in the left-hand column and the text in italics as a condition for the title in the right column. Use a correct indentation during the compilation of the rules.

    -------------------------------------------
    Attribute 1
    -------------------------------------------
    *0*     any
    A is unknown or

    Uncertain East
    and
    any
    B is unknown or
    B is uncertain
    and
    any
    C is unknown or
    C is uncertain
    ----------------------------------------------
    Has any     
    B is unknown or
    B is uncertain
    and
    any
    C is unknown or
    C is uncertain
    ----------------------------------------------
    A + B C is unknown or     
    C is uncertain
    -----------------------------------------------
    A+B+C in the opposite case     

    Thank you
    Sofiane

  • Application of the rules to Instances of entity in a sequence (multiple calls necessary?)

    Hello

    In my OPA team, we have a situation in which it would be useful to be able to run a series of calculations on a set of instances sequentially. We wonder if there is an acceptable method for this in a single call to a modules, because the OPA does not allow a loop or a sequential processing of data in a way that seems obvious.

    Context:
    Consider a situation involving a computation that can be performed on a single Bill, but we have a series of bills to deal with. For example, let's say that there are a certain amount of a deduction or "co-payments" that must be subtracted from the large bills, but is deducted in greater quantity of invoices received earlier (rather than be distributed also among them) and then will deplete fairly once was subtracted in all. In this case, it is not sufficient to use a statement of the type «for each of the Bills...» "because the conditions for the calculation have to change with each invoice. This seems to require the ability to browse an ordered list, but we do not know if something like this is possible (without violating an axiom or advised).

    Ideas:
    The best idea we could come to would be to use a time stamp to identify the Bill earlier as a starting point and then use the function of 'unknown' to force the rules to calculate the deduction for 'other' more former Bill in sequence. The current solution will be to call several times modules by an external script that loops through the Bills.

    To sum up, we wonder whether there is an acceptable approach to apply a set of rules to an entity instance before to apply the same rules to others, without requiring multiple calls for modules.

    Thank you!
    -Patrick

    Published by: Patrick guess on July 6, 2011 19:11

    You started down the right path. To quickly answer questions, there is no need for multiple calls to the basis of rules, no for ranking explicit rules or data.

    The challenge when using unordered rules / systems of determinations is out procedural thinking (that loops or sequencing data explicit is required). The solution is by expressing the declarative logic equivalent (which requires no sequence with the right answer). In this case, consider the calculation from the perspective of one invoice at a time and write the rules that express properly how much to pay, what is the quota, etc. For the batch processing where running tallies are needed, there is something practical for use in the rule based systems - conclude the subtotal per each item being counted (for example, remaining annual quota through each invoice). This approach allows the declarative rules which "defined" the method calculate the score by a Bill, so that the following invoices can use the score of previous bills. Unfortunately, the description abstract approach always sounds more confused, so here is an example of rule of pseudocode that can communicate the key elements of the approach...

    Assume:
    Bills have numbers (or dates/hours) which can be used to conclude an absolute order for all bills (we will use Bill in ordering them in this example)
    Remaining annual quota of the person is the initial amount of copay remaining before the current batch of invoices is treated
    Each invoice must include a co-payment of $50 (for simplicity, although this could be concluded by rules and vary based on the services provided, etc.)
    Assume all bills are more than the share (again to simplify this example, this could be dealt with in the rules of both conditions)
    The main objectives of the basis of rules are to determine the share of each invoice and the balance sheet of the share of the person (i.e. copay they may still have to pay this year) after treats a batch of invoices.

    Pseudo rules to get the general concept:

    Set the order in which the bills need to be addressed...
    -The Bill (prior Bill) is a member of previous invoices of the invoice if the s prior invoice ID< the="" invoice's="">
    -The Bill (later Bill) is a member of the subsequent invoices of the invoice if the invoice later s ID > ID of the invoice
    -The Bill (Bill immediately preceding) is a member of if immediately before invoice
    the immediately previous invoice is a member, if the prior Bill of Bill AND
    the number of previous invoices of the invoice with ID > ID of the invoice immediately before = 0

    To conclude the first remaining share of each invoice... put them in a table of rules, so they can conclude the same attribute but use different logical formulas
    -Initial remaining Copay of the invoice = remaining share of the person if the number of the invoice is immediately previous bills is 0 (i.e. the first Bill in the batch)
    -Initial remaining Copay of the invoice = share of remaining final invoice of the immediately previous invoice (i.e. each ' initial rest copay "is the same that the invoice immediately before the 'final remaining copay)

    A table is used to define how much share for each invoice - two possible scenarios...
    -Share of the invoice = $50 if the original invoice remaining share > = $50
    -Share of the Bill remaining share = original invoice if the original invoice remaining quota<>

    A rule to determine the final remaining share of each invoice (i.e. after subtracting the share upward through this invoice of the annual overall amount of the person)
    -Copay remaining final invoice = remaining share original of the invoice - share of the Bill

    A rule to determine the person remains final share (i.e. After all invoices in this batch have been processed)
    -remaining share final person = final remaining share of the Bill if later the invoice s County bills = 0 (i.e. the final copay remaining of the 'last' Bill in the batch)

    Note that some attributes and relationships above are not absolutely necessary (i.e., it is not necessary to postpone the two remaining original co-pay and determine a final remaining share by invoice, but it retains the logic of each a little more simple rule).

    Hope that helps...

  • Fragments of rule in the rules of shortcut

    I had a table of shortcut rules that did not work, something in the sense of:

    Shortcut rule

    the result of the transaction

    'Result' - AttributeX = 5
    ' Result B '-AttributeX = 6
    ' Result C '-AttributeY is set to true
    ' Result D '-AttributeZ is set to true

    I found the reason why it cannot work because I've had conditions on several attributes within a single table. Thinking that the fragments of the rule may be the answer, I divided the rule 3 fragments (each rule shortened, but still the tables I seem not to be able to set the value of a text attribute otherwise).

    rule_property [fragment: 1]
    Shortcut rule

    the result of the transaction

    'Result' - AttributeX = 5
    ' Result B '-AttributeX = 6

    rule_property [fragment: 2]
    Shortcut rule

    the result of the transaction

    ' Result C '-AttributeY is set to true

    rule_property [fragment: 3]
    Shortcut rule

    the result of the transaction

    ' Result D '-AttributeZ is set to true


    However, regardless of the values of attributes X, Y and Z, the rule always seems to set the result value, any ideas? Is it permissible to use fragments of rule in the rules of shortcut?

    Then use your phone to call example, what about a regular rule like that?

    + (conclusion) + the call has ended if
    + (Level 1) + the customer has not responded to the phone or
    + (Level 1) + the customer hung up or
    + (Level 1) + a sale was filed with the customer or
    + (Level 1) + customer details were collected

    The conclusion ("the call is ended") will remain unknown until one of the following attributes is set to true:

    the customer has not responded to the phone
    the customer hung up
    a sale has been filed with the customer
    customer details were collected

    And it could be the case that some of these attributes depend on other things, for example

    + (conclusion) + customer details have been collected if
    + (Level 1) + the customer name is known and
    + (Level 1) + name of the client is known and
    +(Level 1) + address e-mail client is known

    ... where the 'customer name', 'customer name' and 'customer e-mail address' are all text attributes declared in modules.

    Have you trained as an OPA? I suggest strongly that do you. Your first post, looks like you're thinking about OPA from the perspective of traditional programming. Modeling of the OPA rule is different. I think you would benefit greatly from taking a rule OPA training course.

  • Rejection of record over the rule

    Hi all

    can someone show it please how to set a record rejection while build size / loading using the rules file (9.3 X / 11 X)

    Open the data preparation editor and open a file, the data from the file or open the SQL data you need to load.
    If you want to deny a particular record in the column, click the column and at the top you will find the symbol by a tick and a Cross mark they mean Select and reject Record.
    To do this, click Record (Cross Mark) reject you will get a screen with
    Condition of case-sensitive string type/number
    The type - is a dropdown menu with (String and number)
    String/number - the value that you must reject based on this you select the Type
    Condition - You get all comparison operations
    Case - Check this mark to address the distinction uppercase / lowercase

    You can add several conditions also.

  • Work of the SQL Agent - last execution in return in the output of the rule

    Hello world

    EU struggling to change the DBSS - Jobs doesn't have a rule for the last time of execution at the exit of the rule. Whenever the alert is deactivated, the alarm regenerates and we need to make the time of incapacity for work in the output of the alarm.

    It is where I have to this day.

    def a = #last_run_finish_time_obs #.

    def d = new Date (a)

    return d.toString)

    where last_run_finish_time_obs = 1338543342000

    However, I get the following result of the "run query Condition" in respect of the State

    com.quest.nitro.service.sl.interfaces.scripting.ScriptingException: com.quest.nitro.service.sl.interfaces.scripting.ScriptAbortException: groovy.lang.GroovyRuntimeException: did not find constructor for: def java.util.Date (com.quest.nitro.service.scripting.ObservedDataQueryResult) - beginning of script - a = #last_run_finish_time_obs # def d = new Date (a) return d.toString () - end script--

    I guess it's because as #last_run_finish_time_obs # is a collection of values.

    How to recover the last value of this object

    I have observed data under Configuration - and I get the underside of properties for the object under the last race last end time Obs

    Start time

    End time

    Time sampled

    Value

    Any help would be appreciated.

    Try this:

    ----------------------------

    def a = #last_run_finish_time_obs #.

    def d = new Date (Long.valueOf (a.toString ()))

    return d.toString)

  • How to reject the week 41 to 52 from 2007 data in the rules file

    Hello
    I must dismiss 2007W41 2007W52 according to load data, which means I want just the data up to 2007W40.

    Now until I've done is I edited the rule files went to select the Time column > folders > reject > since I have to dismiss more than one, I chose 'and '.

    the field is displayed as "Time" at the top

    Type string / number of Condition
    String 2007W41 contains

    Can someone tell me what I'm doing wrong here?

    Thanks in advance...

    I think that you read it wrong
    Think of the string aaaaa

    To make the rejection criteria in engilish. You want to deny if the string contains aaaa or bath
    IF you reject if the string contains yyyy which is good and meets the criteria
    If you add and the string contains bbbb it is no longer true because he dones do not contain benamer

    If my thong was aaaabbbb then the and would work

    If you use a non contains, then youwould have to employ the and instead of the or.
    IF the string does not contian aaaa and does not bbbb

    All this should not be confused with the global and/or logic that works on multiple columns

Maybe you are looking for