Misbehaving Custom Timed Script 3-State Monitor

I am stumped for an action plan to resolve this issue and would gladly appreciate any possible help!!!
Issue:
Monitor has generated an alert with Resolution State=New when Healthy Expression is true and then later (without any configuration changes) another alert with Resolution State=New is generated when Unhealthy Expression is true.
Last night/this morning, I saw both of the following generated as notifications:
Last modified time: 2/10/2014 10:11:37 PM Alert description: Queue has a length of 4175 and has exceeded a threshold value of 3,500
Last modified time: 2/11/2014 9:11:37 AM Alert description: Queue has a length of 770 and has exceeded a threshold value of 3,500
Similarly created monitors which target other databases using different SQL scripts seem to behave properly.
Assessment:
Monitor targets SQL database object with Performance parent monitor, runs every 15 min and runs a SQL query to generate an integer value which is assigned to "PerfValue".
Unhealthy expression is Property[@Name='PerfValue'] greater than or equal to 3500
Degraded expression is Property[@Name='PerfValue'] equals 'unknown'
Healthy expression is Property[@Name='PerfValue'] less than 3500
Alert description is
Queue has a length of $Data/Context/Property[@Name='PerfValue']$ and has exceeded a threshold value of 3,500
Health is configured as follows:
Health condition:Healthy = Operational State:Healthy = Health State:Healthy
Health condition:Degarded = Operational State:Degraded = Health State:Warning
Health condition:Unhealthy = Operational State:Unhealthy = Health State:Critical
Generates alerts is enabled and Auto resolve is also enabled.
Ideas? Thanks in advance!!

Thanks for the response Markus.
The string was provided by my predecessor as a type of placeholder value in case the client determined a threshold value for a Warning state.  You are correct that it doesn't make sense to mix type.
Root cause has been identified and I am in the process of implementing it.
The reference article that identified root cause is here:
http://blogs.technet.com/b/jimmyharper/archive/2009/10/01/using-integers-and-other-non-string-data-types-in-rules-and-monitors.aspx
For some unknown reason, this issue impacted only 2 of the ~10 new monitors that I setup within the same MP.  It would be great to know what particular action or detail caused this.  It seems I may need to regularly inspect the exported xml after
any monitor changes.
It is too bad the new monitor wizard does not provide a warning during monitor setup of unexpected results if a numerical operator is selected for a value type that it knows is a string.  This is especially true when using the Script-based monitor
which I understand to always expect a returned integer value. Or it should show in the GUI what the actual data type it has assigned is.
Thanks again for your interest and taking time to respond!

Similar Messages

  • An error occcurred on line 105 while executing script 'MOM Backward Compatibility Service State Monitoring Script"

    We've been getting the following error for some time now.
    An error occurred on line 105 while executing script 'MOM Backward Compatibility Service State Monitoring Script'
    Source: Microsoft VBScript runtime error
    Description: The remote server machine does not exist or is unavailable: 'GetObject'
    One or more workflows were affected by this.
    Workflow name: System.Mom.BackwardCompatibility.ServiceStateMonitoring
    Instance name: server.domain.local
    Instance ID: {INSTANCE}
    Management group: GROUP
    Unfortunately the instance in question has since been decommissioned and simply does not exist any more. 
    We're currently on a repeat count of over 350,000 and I would REALLY like to get it stopped. I've had a look at adding an override but that points to the management server rather than the instance itself.
    Does anyone have any suggestions?
    thanks in advance!

    Hi Steven,
    There are for option for us to override a monitor ot rule:
    For all objects of class:             
    Class            
    When you select this option for your override, the override settings apply to all objects in the class at which the rule or monitor is targeted.
    For a group            
    When you select this option for your override, the override settings apply only to members of the group. The rule or monitor without the override settings continues to apply to all objects in the targeted class except for those objects that are also members
    of the group used for the override.
    When you create a group, you save it to an unsealed management pack. However, an element in an unsealed management pack, such as an override, cannot reference an element in a different unsealed management pack, such as a group. If you are going to use a group
    to limit the application of an override, you must either save the group to the same unsealed management pack as the override, or you must seal the management pack that contains the group.
    For a specific object of class:             
    Class            
    When you select this option for your override, the override settings apply only to the specified object. The rule or monitor without the override settings continues to apply to all other objects in the targeted class.
    For all objects of another class            
    When you select this option for your override, the override settings apply only to objects of a class other than the targeted class. The rule or monitor without the override settings continues to apply to all objects in the targeted class.
    Did you try to override it for a specific object of class?
    Regards,
    Yan Li
    Regards, Yan Li

  • How can I add SCOM 2012 Alert Context within a SCOM Alert When using a cusom powershell script in a two state monitor?

    Hello, we have a two state monitor and I would like to channel the Alert Context to Alert Description.
    The powershell script being used to find the stopped services is pasted below:
    $API = new-object -comObject "MOM.ScriptAPI" 
    $bag = $api.CreatePropertyBag()
    $ServiceStatus = Get-WmiObject -class win32_service |where {$_.startmode -eq'Auto'-and $_.State -eq 'Stopped' -and
    $_.name -ne 'wuauserv'}
    if (!$ServiceStatus) #if there are no automatic services that are stopped, we are healthy.
    write-host "good"
    $bag.addvalue("State","good")
    if ($servicestatus) #if there are any automatic services that are stopped, we are unhealthy.
    write-host "bad"
    $bag.addvalue("State","bad")
    foreach ($service in $servicestatus) #enumerate the stopped services
    $bag.addValue("$($Service.Name):","$($Service.state)")
    $bag
    $API.Return($BAG)
    The results of the services that are stopped are being captured in the Alert Context”. How can I pipe the Alert Context to “Alert Description” to obtain a meaningful alert?
    Alert Context data:
    Property Name                              Property Value
    State                                                  
    bad
    clr_optimization_v4.0.30319_32: Stopped
    clr_optimization_v4.0.30319_64: Stopped
    How can I pipe to Alert Description in SCOM 2012?
    Thanks,
    Kapil Dham
    Kapil Dham

    you don't need write-host
    you should create
    $bag.addvalue("ServiceName1","StateOK")
    $bag.addvalue("ServiceName2","StateStopped")
    and in alert description you will see
    ServiceName1  
    StateOK
    ServiceName2  
    StateStopped
    So try $bag.addValue($Service.Name,$Service.state)
    and $Data/Context/Property$

  • How to convert an Excel Formula to a Custom Calculation Script in a Adobe Acrobat 9 Form?

    Hello,
    I am not familiar whatsoever with Javascript and need some help in converting the following Excel Formula so that I can enter it into a Custom Calculation Script in a Adobe PDF Form. Here is the formula:
    =IF(E15<25.01,9.95,IF(E15<50.01,11.95,IF(E15<75.01,13.95,IF(E15<100.01,16.95,IF(E15<150.01 ,19.95,IF(E15<200.01,24.95,IF(E15>200.00,E15*0.125)))))))
    Where "E15" will be the text field named "Subtotal" on my Adobe PDF Form.
    Thank you for any help you can provide!

    Fortunately JavaScript has the 'switch' statement so nested if statements can be avoided.
    var E15 = this.getField("Subtotal").value;
    switch(true) {
    case (E15 < 25.01) :
    event.value = 9.95;
    break;
    case (E15 < 50.01) :
    event.value = 11.95;
    break;
    case (E15 < 75.01) :
    event.value = 13.95;13
    break;
    case (E15 < 100.01) :
    event.value = 16.95;
    break;
    case (E15 < 150.01) :
    event.value = 19.95;
    break;
    case (E15 < 200.01) :
    event.value = 24.95;
    break;
    case (E15 > 200) :
    event.value = E15 * 0.125;
    break;
    default:
    event.value = "";
    break;
    } // end switch;

  • How do I create an "if" function in a custom calculation script?

    I need to take a simple "value is the sum of" and make it so if one field is less than 1 then the result of the formula will equal "0".
    For example here is a simple "sum of" script:
    Incent Bns.26, Time Bns.26, Spec Bns.26.
    Now converted to a custom calculation script:
    event.value = ((this.getField("Time Bns.26").value) + (this.getField("Incent Bns.26").value)) + (this.getField("Spec Bns.26").value);
    Where Time Bns is calculated by looking at another field Hours26 using a special formula to calculate the bonus.
    I would like to add something like an "if" function to the script so that if the Hours26 field is less than 1 then the output of the script will equal "0".
    I tried this already:
    var rank = this.getField("Hours26").value
    var value = 0
    if (rank < 1) {
      value = 0
    else  (rank > 0) {
       value = ((this.getField("Time Bns.26").value) + (this.getField("Incent Bns.26").value)) + (this.getField("Spec Bns.26").value);
    event.value = value
    But get the error: SyntaxError : missing ; before statement 7 at line 8:
    Thanks ahead of time for any help.
    Bruce

    Try this:
    var rank = this.getField("Hours26").value;
    var value = 0;
    if (rank < 1) {
      value = 0;
    } else {
       value = ((this.getField("Time Bns.26").value) + (this.getField("Incent Bns.26").value)) + (this.getField("Spec Bns.26").value);
    event.value = value;

  • Custom calculation script for checkboxs

    Hello,
    Can anyone help me out with custom calculation script for this?  I have two mutually exclusive checkboxes that, when checked, I want to populate data into other text fields.
    If Checkbox1 is checked:
    Company1=Warehouse Alpha
    Address1=1234 Any Street
    City/State/Zip1= Los Angeles, CA 90020
    Contact Name1= Mr. Nice Guy
    Phone Number1= 213-854-8565
    Email1=[email protected]
    If Checkbox2 is checked:
    Company2=Warehouse Beta
    Address2= 5678 Awesome Blvd.
    City/State/Zip2= San Bernardino, CA 96545
    Contact Name2= Mr. Handsome
    Phone Number2= 909-824-8265
    Email2=[email protected]
    Thanks,
    Bryan

    So one has two check boxes and one wants them to be mutually exclusive. Name them the same and change the export value of the field. Try it and observe what happens as you check the different check boxes.
    You have described what happens if either box is checked but what happens when a checked box Is unckecked?
    One can place scripts in many locations. I would use a mouse up action for both the check boxes, use the same script for both check boxes.
    I would assume you are using the following names for the fields to populate:
    Company
    Address
    CityStateZip
    ContactName
    PhoneNumber
    Email
    // Mouse up action for both check boxes;
    // initial value for the fields:
    this.getField("Company"),value = "";
    this.getField("CityStateZip"),value = "";
    this.getField("ContactName"),value = "";
    this.getField("PhoneNumber"),value = "";
    this.getField("Email"),value = "";
    // test for check box value for selected box;
    if(event.value == 1) {
    this.getField("Company"),value = "Warehouse Alpha";
    this.getField("CityStateZip"),value = "1234 Any Street";
    this.getField("ContactName"),value = "Los Angeles, CA 90020";
    this.getField("PhoneNumber"),value = "213-854-8565";
    this.getField("Email"),value = "[email protected]";
    if(event.value == 2) {
    this.getField("Company"),value = "Warehouse Beta";
    this.getField("CityStateZip"),value = "5678 Awesome Blvd.";
    this.getField("ContactName"),value = "San Bernardino, CA 96545";
    this.getField("PhoneNumber"),value = "Mr. Handsome";
    this.getField("Email"),value = "[email protected]";
    // end Mouse up action for both check boxes;

  • UPDATE statement monitoring

    Does anybody know how to monitor update statement? I am updating 3 Million rows and it taking long time to complete. I just want to make sure this statement not hanged.

    With a minor bit of effort on your part, you can do a search on, for example, longops, and then copy/use one of the gazillion sample scripts used to monitor long operations.

  • How do I run a snmpwalk/any bash command as a Linux/Unix command (2 state monitor) on a Isilon storage device

    Is there a way that I can run a snmpwalk / isi devices (to find the status of the disk drives in islon) / any Linux bash command using a 2 state monitor Unix/Linux shell command and target a storage device (Isilon in my case) and not target a Unix/Linux
    machine. I tried creating one and it complained saying,
    Is there a way I could run a bash command in my isilon storage and use the ouput to determine the state of the monitor? Please let me know
    Hari V

    For Unix/Linux shell command in Operation Manager to monitor 2 state, you can refer to below link
    http://contoso.se/blog/?p=2680
    http://stefanroth.net/2012/10/21/scom-2012-linux-two-state-monitor-with-script-in-script/
    http://operatingquadrant.com/2012/02/01/opsmgr-2012-unixlinux-authoring-templates-more-information-on-the-shell-command-templates/#more-746
    Please remember, if you see a post that helped you please click (Vote As Helpful" and if it answered your question, please click (Mark As Answer).

  • OBIEE variables in custom java script

    Hello all
    Can I use OBIEE variables like presentation and session variables in my custom java script code that I am writing in text view on a dashboard page. Is it possible to do that. please me soon if somebody knows the solution to do that.
    Thanks in Advance

    Hi john
    Thanks for reply, I am able to generate javascript using text view on a dashboard page.
    But I want to access OBIEE variables in javascript. How I can do that in narrative view. Can u explain me or give me any link.
    Thanks

  • Character Limit to Custom Calculation Script?

    Hi. I have a document that has a text form field. I want to run a custom calculation script that basically says if field "Group Number" = xxxxxxx, then field "Group Name" should = ABC Company.
    I have a list of almost 575 group numbers and names that I need to put in the script. And I've got the script working just fine but I am guessing there is a character limit to the script field???? It won't let me put my full list in there.
    Any suggestions on how to get around this??
    Thanks,
    Brandy

    I think I might have one error but I thought I had corrected it. Let me run this by you. My "if" lines are like this:
    if(a == '88096') event.value = 'Stacy's Carpet Steam Cleaning Company';
    But the code doesn't seem to like the ' in the Group's name. Is there a way to correct that without getting rid of the ' .... ?????

  • Need Assistance With Custom Calculation Script

    I need help with a custom calculation script in Acrobat Pro.  I am trying to add the sum of fields A, B, C, D, E, F, and G together with the lesser value of fields H and I.  What would be the script to enter for this result?  Thank you.

    event.value = Number(this.getField("A").value) + Number(this.getField("B").value) + Number(this.getField("C").value) + Number(this.getField("D").value) + Number(this.getField("E").value) + Number(this.getField("F").value) + Number(this.getField("G").value) + Math.min(Number(this.getField("H").value), Number(this.getField("I").value));

  • Help with Custom calculation script in Acrobat 8

    Hi all, I am using acrobat 8 on OS 10.5
    I am trying to add certain fields (numbers) and then subtract another field value to give an end result.
    I don't know anything about Javascript, would anyone be able to help with any info on how I achieve this result? I can only see Add, x and average etc... nothing there for subtraction
    Thanks for any help in advance
    Swen

    This should get you started:
    >if (event) {
    // get values from two text fields
    var a = Number(this.getField('Text1').value);
    var b = Number(this.getField('Text2').value);
    // subtract the values and show it
    this.event.target.value = a - b;
    Place this in a 3d text field, as a Custom Calculation Script.

  • Is it possible to use extensive formulas (e.g. "if" or vlookup functions) in the "Custom Calculation Script"?

    I am working on a form fill PDF converted from MS excel. This is for others to use who don't have MS excel that need to use my spreadsheet.
    1. I would like to know how complex can the formulas be in the custom calculation script in the calculate tab under properties in a cell menu?
    2. Where can I find what formulas will work in the custom calculation script along with the format for those formulas to work correctly (tutorials would help)?
    I have tried writing an "if" function but received and error so I am assuming either functions don't work in the script or there is a different format than standard spreadsheet formats.
    Bruce

    In that case the for loop would be:
        for (var i = 0; i < 8; i += 1) {
            sum += +getField("Total." + i).value;
    So initially, the counter i is equal to zero, so the field name used with the getField method is:
    "Total." + 0, which results in the string "Total.0". With each iteration, the variable i is incremented by 1, so the subsequent field names are the following:
    "Total.1"
    "Total.2"
    "Total.3"
    "Total.4"
    "Total.5"
    "Total.6"
    "Total.7"
    The script gets the value of each field, converts it to a number, and adds the number it to the running sum.

  • Custom Calculation Script Help Needed

    I need to make a script that Sums a column of fields based on whether or not information found in another column of fields is the same or specific text. Please see below screenshot of what I would like it to do.
    I would like a Sum of all Amounts that have the Code A...

    You can use this script as the custom calculation script of "SumOfA":
    var total = 0;
    for (var i=0; i<=2; i++) {
        if (this.getField("p1TC."+i).value=="Code A")
            total+=Number(this.getField("p1RecIn."+i).value);
    event.value = total;
    You can easily adjust it for the other field as well.

  • Custom calculation script for a lease (please help)

    I have so little experience with this it isn't funny.  I prior to now have never used javascript.  But Im trying to get my lease form to auto calculate a tenants pro-rate that would be due if they moved in on the middle of the month for example.
    I created the below script and im sure there is a few things or more than a few things wrong with it...can anyone give me some pointers.
    // Custom Calculate script
    (function () {
        // Get the input field values, as strings
        var leasemonth = getField("LeaseBegMonth").valueAsString;
        var leasestartday = getField("LeaseBegDay").valueAsString;   
        var rentamount = getField("MonthlyRent").valueAsString;
        // calculate how many days in the month
        if ( leasemonth=1
                var leasedays = 31
        elseif (leasemonth=2
                var leasedays = 28
        elseif (leasemonth=3
                var leasedays = 31
        elseif (leasemonth=4
                var leasedays = 30
        elseif (leasemonth=5
                var leasedays = 31
        elseif (leasemonth=6
                var leasedays = 30
        elseif (leasemonth=6
                var leasedays = 30
        elseif (leasemonth=7
                var leasedays = 31
        elseif (leasemonth=8
                var leasedays = 31
        elseif (leasemonth=9
                var leasedays = 30
        elseif (leasemonth=10
                var leasedays = 31
        elseif (leasemonth=11
                var leasedays = 30
        elseif (leasemonth=12
                var leasedays = 31
        //CALCULATE HOW MANY DAYS REMAIN
        var daysremain = LeaseBegDay-leasedays   
        //CALCULATE THE PRORATE AND DISPLAY IT
        event.value = (rentamount/leasedays)* daysremain
    Thanks for your help!!

    Thank you thank you thank you!  Here is the revised script with the changes.  about to go plug it in and see if it works.
    // Custom Calculate script
    (function () {
        // Get the input field values
       var leasemonth = Number(this.getField("LeaseBegMonth").valueAsString);
       var leasestartday = Number(this.getField("LeaseBegDay").valueAsString);   
       var rentamount = Number(this.getField("MonthlyRent").valueAsString);
       var leasedays = 0
        // calculate how many days in the month
    if ( leasemonth==1)
           leasedays = 31;
    else if (leasemonth==2)
           leasedays = 28;
    else if ( leasemonth==3)
           leasedays = 31;
    else if (leasemonth==4)
           leasedays = 30;
    else if ( leasemonth==5)
           leasedays = 31;
    else if (leasemonth==6)
           leasedays = 30;
    else if ( leasemonth==7)
           leasedays = 31;
    else if (leasemonth==8)
           leasedays = 31;
    else if ( leasemonth==9)
           leasedays = 30;
    else if (leasemonth==10)
           leasedays = 31;
    else if ( leasemonth==11)
           leasedays = 30;
    else if (leasemonth==12)
           leasedays = 31;
        //CALCULATE HOW MANY DAYS REMAIN
        var daysremain = leasestartday-leasedays   
        //CALCULATE THE PRORATE AND DISPLAY IT
        event.value = (rentamount/leasedays)* daysremain

Maybe you are looking for

  • Dynamic MXML?

    Hi, I have the need to display a different form <mx:Form /> based on a selection in a flex tree control. I have 10 forms in total, each completely different. The code is mxml, not actionscript so I am unsure how to do the if/else logic to change the

  • Namespace Creation for my SWCV

    Guyz, i just created a swcv and i right-clicked and select 'Namespace' item. In edit mode, though the section 'Namespaces*' is appearing , there isn't any placeholder to type my namespace value..... i'm on NW04s ....is it something i missed while cre

  • Photoshop CC and Nik HDR Efex

    Hiya everyone, I'm new to PS CC so finding some of the things I do are not working so well I use Nik HDREfex a lot. I do my tonemapping in HDREfex and then save my file as 32bit TIFF so I can later open and save as 8 bit JPG, but now (with PS CC) whe

  • ANYONE ANY GOOD AT ACTION SCRIPT?

    Hi Im trying to link my animated buttons to pages on a website. The flash file is linked to an exernal _url.txt file where it seems simple enough to amend, but all the flash buttons seem to link to the one page only (noted in _urls.txt as Url1? Any i

  • Contract Automatic Renewal Issues

    Hello, We took a connection in January, 2009 (a 12 month contract). I am not able to find that plan anymore. Basically, we had Unlimited Broadband, Weekends Call Free. That contract is supposed to have ended by December 31, 2009. Is BT supposed to se