Derived metric help

Hello

I'm trying to configure a derived metric.  We have announced several LPAR Unix team likes to look at the CPU usage in number of processors used not in use %.  My thought is to take the County of virtualCPUs of the CPUCounts and the use of the HostCPUs.  Multiply these together and I should get the number of processors currently in use. Thus, for example

CPUCounts.virtualCPUs = 4

HostCPUs.utilization = 50%

sum (4 * 50%) = 2

The current CPU in use is 2.

However, I am not able to get the correct syntax for the derived metric.  Any help would be greatly appreciated.  And if there is a better way to do it then I am, for that as well.

Thank you

Matt

Try:

scope is an instance of HostCPUs

cpuCounts = #! CPUCounts: UC = $scope # .topologyObjects

cpuCount = cpuCounts.iterator () .next)

logic = cpuCount.logicalCPUs

Physics = cpuCount.physicalCPUs

virtualCPUs = cpuCount.virtualCPUs as Double

use = (#utilization #)? div (100)

inUse = (virtualCPUs * use)? Round (2)

I do not recommend this calculation because I don't think it gives the exact measure of processors in use. Also, I do not recommend round a value specified so that it is less accurate (but that's a minor quibble).

Kind regards

Brian Wheeldon

Tags: Dell Tech

Similar Questions

  • VM growth over the last few days N derived metric

    You are looking for assistance in creating a derived metric that would take a point in the metric of time of there are say 6 months, "poweredOnVMCount", he subtract from the current "poweredOnVMCount" and divided it by the number of days between the two measures, effectively providing the daily growth. Any help would be appreciated.

    Thank you

    Joshua

    You can use a replace a variable in the string using the "$", for example $numdays.

    Try something like this (the scope is a VMWCluster):

    then = null

    numdays = 180

    While (then == null) {}

    try {}

    String query = "VMWCluster:name virtualMachinesPoweredOnCount =" $scope.name "for day 1 day $numdays»

    then = max (server. QueryService.queryObservations (query))

    }

    catch (Exception e) {}

    numdays-

    }

    "+ numdays ++ +" days ago there was "+ then +"VM under tension.

    My result:

    56 days ago, there were 3.0 VMs under tension

    Kind regards

    Brian Wheeldon

  • Need to create a derived metric to calculate the amount of memory in GB

    Hi team,

    We would like to know how we can create a Derived metric to determine the usage of the memory of a specific host in the UK, I have a host who, as 80 GB memory and I need to create an alert when usage exceeds 40 GB...

    I saw the Option for the used memory capacity but it shows in Mo... How to convert the same into GB

    Concerning

    Sriram S

    You need not create a metric derived to do what you want.  Who would try too hard.

    Memory is usually stored in Foglight in megabytes.

    Just write the rule to create the alert when it exceeds (40 * 1024) MB.

  • Remove the derived metric

    I recently updated several derived measures I use and finished with duplicates. I deleted the old copies of the list of metrics derived, but still, they show in the data and could lead to confusion in the future. Is there a way to remove these measures in the data tables?

    Thank you

    Wyatt

    Hey Wyatt,

    You can find the solution on SupportLink in Solution SOL73487.

    Example:

    def ts is server. TopologyService

    def tt = ts.getType ("HostStorage")

    def updateTT = ts.beginUpdate (tt)

    updateTT.removeProperty ("ktest_space_available")

    TT = ts.endUpdate (updateTT)

    Kind regards

    Brian Wheeldon

  • Metric derived in FMS log errors

    Hey guys,.

    A month or two there are yall really helped me when I tried to create a metric derived for number of CPU.  That's what we were using.

    scope is an instance of HostCPUs
    cpuCounts = #! CPUCounts: UC = $scope # .topologyObjects
    cpuCount = cpuCounts.iterator () .next)
    logic = cpuCount.logicalCPUs
    Physics = cpuCount.physicalCPUs
    virtualCPUs = cpuCount.virtualCPUs as Double
    use = (#utilization #)? div (100)
    inUse = (virtualCPUs * use)? Round (2)

    It still works very well for what I wanted, but I see several errors in the FMS logs about this derived metric.  I think I need to scope it better so that these errors do not appear in the newspaper, but I'm not sure what it takes to reach.  Any help would be greatly appreciated! It is currently limited to HostCPUs

    Here is an example of the errors that I see in the log file, I guess that's because a value is zero, but Im not sure how to modify the code to check that.

    2013-04-23 05:48:00.889 WARN [data-3-wire-12472] com.quest.nitro.service.derivation.DerivationService - impossible to evaluate the following calculation: DerivationCalculation for "CPUUsageCount" on "HostCPUs" calculated by (/ / scope is an instance of HostCPUs)
    cpuCounts = #! CPUCounts: UC = $scope # .topologyObjects
    cpuCount = cpuCounts.iterator () .next)
    logic = cpuCount.logicalCPUs
    Physics = cpuCount.physicalCPUs
    virtualCPUs = cpuCount.virtualCPUs as Double
    use = (#utilization #)? div (100)
    inUse = (virtualCPUs * use)? Round (2)

    ) DATA_DRIVEN
    com.quest.nitro.service.sl.interfaces.scripting.ScriptingException: com.quest.nitro.service.sl.interfaces.scripting.ScriptAbortException: java.lang.NullPointerException
    -beginning of script-
    scope is an instance of HostCPUs
    cpuCounts = #! CPUCounts: UC = $scope # .topologyObjects
    cpuCount = cpuCounts.iterator () .next)
    logic = cpuCount.logicalCPUs
    Physics = cpuCount.physicalCPUs
    virtualCPUs = cpuCount.virtualCPUs as Double
    use = (#utilization #)? div (100)
    inUse = (virtualCPUs * use)? Round (2)

    --end of script--

    at com.quest.nitro.service.scripting.ScriptingService.invoke(ScriptingService.java:618)
    at com.quest.nitro.service.rule.expression.Expression.evaluate(Expression.java:125)
    at com.quest.nitro.service.rule.expression.Expression.evaluate(Expression.java:138)
    at com.quest.nitro.service.derivation.DerivationCalculation.evaluateExpression(DerivationCalculation.java:764)
    at com.quest.nitro.service.derivation.DerivationRulette.trigger(DerivationRulette.java:318)
    at com.quest.nitro.service.derivation.DataDrivenDerivationRulette.arm(DataDrivenDerivationRulette.java:51)
    at com.quest.nitro.service.derivation.DerivationService.process(DerivationService.java:817)
    to com.quest.nitro.service.data.DataService$ PublishMetricsTask.callProtected (DataService.java:1106)
    to com.quest.nitro.service.data.DataService$ PublishMetricsTask.publish (DataService.java:1072)
    to com.quest.nitro.service.data.DataService$ PublishMetricsTask.run (DataService.java:1007)
    to java.util.concurrent.Executors$ RunnableAdapter.call (Executors.java:441)
    to java.util.concurrent.FutureTask$ Sync.innerRun (FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    to java.util.concurrent.ThreadPoolExecutor$ Worker.runTask (ThreadPoolExecutor.java:886)
    to java.util.concurrent.ThreadPoolExecutor$ Worker.run (ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused by: com.quest.nitro.service.sl.interfaces.scripting.ScriptAbortException: java.lang.NullPointerException
    -beginning of script-
    scope is an instance of HostCPUs
    cpuCounts = #! CPUCounts: UC = $scope # .topologyObjects
    cpuCount = cpuCounts.iterator () .next)
    logic = cpuCount.logicalCPUs
    Physics = cpuCount.physicalCPUs
    virtualCPUs = cpuCount.virtualCPUs as Double
    use = (#utilization #)? div (100)
    inUse = (virtualCPUs * use)? Round (2)

    --end of script--

    at com.quest.nitro.service.scripting.Script.runInternal(Script.java:334)
    at com.quest.nitro.service.scripting.Script.run(Script.java:255)
    at com.quest.nitro.service.scripting.ScriptingService.invoke(ScriptingService.java:604)
    ... 15 more
    Caused by: java.lang.NullPointerException
    to org.codehaus.groovy.runtime.dgmimpl.NumberNumberMultiply$ DoubleDouble.call (NumberNumberMultiply.java:113)
    at Derivation_CPUUsageCount_on_HostCPUs_script_ae647b916b0dba65d3009a4c6965d9c0.run (Derivation_CPUUsageCount_on_HostCPUs_script_ae647b916b0dba65d3009a4c6965d9c0.groovy:8)
    at com.quest.nitro.service.scripting.groovy.GroovyScript.exec(GroovyScript.java:141)
    at com.quest.nitro.service.scripting.Script.runInternal(Script.java:310)

    derivedMetricName = 'vCpuInUse @ HostCPUs.

    Org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog ("derivedMetric. ("${derivedMetricName} {scope?. monitoredHost?. name}");

    try {}

    try {cpuCounts = #!} CPUCounts where UC = $scope #?. getTopologyObjects()} catch (e) {log.error ("cpuCounts: ${f.toString ()}"); return null}

    cpuCount = cpuCounts?. getAt (0) / / cpuCounts.iterator () .next)

    try {virtualCPUs = cpuCount?. virtualCPUs as Double?: 0.0 d} catch (e) {log.error ("virtualCPUs: ${f.toString ()}"); return null}

    try {use = (#utilization #)?. div (100)?: 0.0 d} catch (e) {log.error ("use: ${f.toString ()}"); return null}

    inUse = (virtualCPUs * use)? Round (2)

    return inUse

    } catch (e) {}

    log. Error ("${try ()}")

    }

    Returns a null value

    This will help you to understand where the errors are produced.

  • Derivative Rulette metric not disabled "no trigger.

    I thought I'd throw it out there that I don't know why my derived metric is triggering not even if I am selecting calendar leads and check the box 'enable the trigger without data '.  I have tested the metric script without problem and can not find a reason why it should not run at the scheduled time.

    2012-11-29 13:17:18.226 VERBOSE [utility-1-wire-45363] com.quest.nitro.service.derivation.DerivationCalculation - DerivationCalculation for "Cluster_Growth_Rate_New" on "VMWCluster" calculated by (ds = server.get ("DataService")...) has rulettes disabled for the following reasons: no trigger (1 rulettes)

    -

    [[(numdays = 0) {break}-} now = ds.retrieveLatestValue(scope,_"virtualMachinesPoweredOnCount").getValue (.max) / / retrieves the current value growthRate = Math.ceil (((now-then) / numdays * 30)) / / calculate the growth rate current growthRate return]] >

    @John - I put the coding offers in the script and found that the derived metric even was not getting a message in the log.

    @Thomas - I have try with "entry, exit and Enter and Exit" without result

    I started to dive a little more and found that my other derived measures 3 which took place successfully for months were no more calculation. I restarted the server and all measures derived including the growth of clusters have been executed successfully. It seems to be some kind of problem with the server and not the derived metric.

  • Metric derived on unifying

    Y at - there a trick to getting my derived metric to appear on my unifying in a child of FMS?

    My understanding is:

    as long as the type of topology that the derived metric extends to East on the unifying, the derived metric must also exist.

    for example if you install cartridge vFoglight on the FMS child and create a metric derived on VMWVirtualMachine, if you have installed the cartridge vFoglight on the unifying of the derived metric should automatically appear there as well.

  • Get a metric based on in dashboard

    Hello

    I installed a new metric that becomes data, but I can't seem to find in the right panel, the data for use in a dashboard tab.  It's a metric created from a State of FxVHitFilter parameter.

    where would I look?

    THX

    "mark".

    Hello

    I found the problem, I didn't, but I got an error in my script inside the calculated variable.  The script runs correctly in the Expression window run the query, but wasn't as a derived measure (visible mistake in derivatives Metrics Diagnostics window).

    Now only cleared and collected data, I see metrics.  For the specific Hit filter that creates the variable of origin in the first place, they appear under the heading FxV.

    "mark".

  • Column derived logical of the MDB - visit bounced

    In Web Metrics, a "visit rebounded" when a session views a page on a Web site and then leaves. In my table of facts, I capture the "total pages" read for each session and I set this metric in my Business Model with a rule of aggregation "sum". I'm trying to use this measure to calculate the metric 'bounced visit' but I'm running into issues.

    Session ID number Total of Pages
    1179860475 5
    1179861625 1 < = this is a visit of rebound
    1179861920 7
    1179866260 2
    1179868693 13

    If I set 'bounced visits' as

    BOX WHEN "total pages" = 1 THEN 1 ELSE END 0

    What I see in the newspapers of session is:

    CASE amount WHEN ("total number of pages") = 1 THEN 1 ELSE END 0

    The aggregation of the pages 'total' is made first, and then the derived metric calculation. This leads to incorrect results. Is in any way to solve this in the business model? I know that I can go back to the ETL, calculate a metric "bounce tour", store it in the fact, create aggregates, etc.. I was looking for a short term solution.

    I tried other things:

    (1) make a copy of the column "total pages" and put off aggregation, call him 'total pages - no aggregation '.

    This leads to queries of the form:

    Select distinct T22583. TOTAL_PAGES C1
    Of
    WEB_SESSIONS_A1 T22583
    order of c1


    (2) create a logical column based on 'total pages - no aggregation '.

    has bounced visit = CASE WHEN EnterpriseWarehouse. "" Web sessions. "' Total Pages - no aggregation ' = 1 THEN 1 ELSE END 0

    This leads to [nQSError: 14020] none of the fact tables are compatible with the query request Web Sessions.bounced visit.

    Sorry that if I wasn't clear... you don't need a new select statement for this... you need to do is to define a column using the physical layer (not an existing column of logic in use)... To do this, you must create a new column in MDB... then you go under the mapping tab and click on button... and you enter it formula using the physical column... Let me know if it is clear...

  • Component rules generator

    Someone at - it a list of variables that I can use in this area.  I know that I can use name as what name as or the name starts with etc...

    It follows the same rules as the Script Console queries, or queries QueryService scope rule queries or queries derived metric bearings.

    You can use practically anything in the model of the topology, except comments/metrics, in queries.

    for example:

    with guests like your selection, you can write a rule such as:

    lastUpdated > date (2013,6,1) and name matches '(?i) abcd. * »

    Less help, Administration and Configuration Guide > customizing your environment with tools > using the query language

  • Service levels

    Hi all

    Just when I thought that I had worked on Service levels...

    I tried the following two provisions separately within Service Builder:

    Service Service [Global] [Global]

    Service Cluster Cluster Service [Global] [Local]

    node1a                                                                 node1a

    node1b                                                                 node1b

    host2                                                                      host2

    host3                                                                      host3

    The color coding is quite simply for the sake of description and show different levels of services.

    • [Global] service is all 'container' for the hosts contained in the service and overall.
    • host2 and host3 are hosts of autonomous - if two of them have a fatal alarm, which affects the service so the number of SLA fall of 100%.
    • Cluster service is the 'container' for the two-node cluster and is at the same level as host2 and host3.  I tried both a local and a global service for this service.
    • node1a and node1b is a two-node cluster - if one of these nodes has a fatal alarm, this should not affect the number of ALS as the other node is still ongoing.  I have created a registry setting in FSMServiceSLP_PercentageAvailableThreshold for Service Cluster [Global] against the value of 50, as well as Service of Cluster [Local] FSMService against FSMChildService of a value of 50, the logic being that 50% of guests at the service (i.e. a server) is always available, the availability of the service is not affected.

    My understanding is that availability of service numbers are inherited "upwards".  In other words, if I create a fatal alert on node1a, what should happen is that Cluster Service remains at 100% (there are still 50% of the available servers node1b still works, that's why the service is not affected) and Global Service remains at 100%.

    However, what seems to happen in practice, it is that the Cluster Service remains at 100%, but the Global Service begins to drop his SLA figure, showing a loss of service.  This is the case without worrying if the Cluster Service is defined as a local or a global service.  This can be confirmed by visiting the dashboard of Service for the Cluster Service and Service levels although there is a fatal alarm for node1a.

    Is it possible for the figure of service level should be given exactly?  In other words, the Service should remain 100% unless that be host2 and host3 or (node1a and node1b) are not available?

    It comes to vFoglight PRO 6.7.1 build 5.6.4.2.  I built the services in the usual way, the option «Foglight can automatically add hosts...» "is not selected and the level is set to the default"let Foglight decide. "

    Thank you

    Brian

    Well, we have this finally solved - Foglight does not calculate the availability of level of service properly, at least not in the way we have been lead to believe.  To summarize...

    If the function is defined as follows:

    [Global] service

    [Global] Cluster service

    node1a

    node1b

    host2

    host3

    If node1a has a fatal alarm, Service [Global] Cluster is not affected (which is OK because it has a value of registry FSMServiceSLP_PercentageAvailableThreshold of 50), but [Global] Service starts to drop (which shouldn't happen).  This is because the level of service availability calculation is also global alarms that would also alarms the child objects.  To work around this, change the level of availability of underlying service code.

    Go to Administration | Data | Manage the derived parameters and filter availability:

    Select the metric range derived from FSMServiceLevelPolicy: sourceIds = $null by clicking on availability:

    Select the calculations derived metric by clicking on FSMServiceLevelPolicy: sourceIds = $null:

    Replace the existing code in the code Expression box in the attachment, and then click Save.  This operation takes you to the screen change the derived metric.  You need to click on save here too, otherwise your code will not change.

    When you install your services, you can use global services to allow you to reuse the service in other parts of your service structure, however, when you set the percentages in the Variable of registry FSMServiceSLP_PercentageAvailableThreshold, these values are set against the topology of FSMServiceLevelPolicy Type:

    Once all this is done, the availability of level of Service for the [Global] is displayed and calculated correctly.

    My thanks to Philipp von dem Bussche-Hünnefeld from Dell to provide the code and help and especially for allowing me to share with the communities.

    Brian

    Warning: a full assessment has not been made to see if there is an impact on the other customer on the SLA management scenarios, so use this code at your own risk.

    Additional accessories:

  • Use of trend CPU for a service

    Hey everybody,

    Hoping you can help.  I would lke to display graphically, use of CPUS to a virtual machine or VMs contained within a service over a period of 6 months. I want also to average usage to demonstrate that usage has increased or decreased during this period of recovery.

    Easy enough to do the first part, but you know how I could also show the average use over this period?  The overlay only as 'average', I can think of will show an average apartment during the entire period.  I really want to show if the average was up or down.

    See you soon

    It is a matter of good use for a derived measure.

    A derived measure is calculated according to one or more other measures.

    In this case, you can define a time - or schedule-driven derived metric whose scope corresponds to a Service.

    The calculation for average usage of the CPU for all guests of the service could look like:

    AVG (#utilization of $scope.hosts.cpus for 30 minutes #)

    Once you have created this metric, you will be able to track this value over time and it monitor changes.

    There is an example of how create a metric derived in How to create a Derived metric (to count the VMS under tension).

    Kind regards

    Brian Wheeldon

  • HostService in IC Agent availability

    I tried to look at the availability of the service windows on a specific host.  However, the only data that resembles collect are "Running" or "Does not work" or a variant of start or stop... However these results of text cannot be mapped on a timeline to see how long the service is down or provide such data on a report.  I tried to create a derived metric that in turn the 'Running' at 100% and any other value would be 0% but I'm not a programmer so my knowledge is limited in this region...

    That's what I was playing with, but I get an error when I try to use it

    TrueAvail = 0

    If (HostServiceState value.name = 'Running')

    Returns the value 100

    on the other

    return TrueAvail

    Can someone help with the derived metric?  or does anyone have any better ideas on how to get windows service availability?

    You can go there. This cartride will create derived parameters svcAvailability and svcBaselineAvailability

    During the creation of the cartridge I fond syntax error in the code above. I've updated that (in the .car & respoonse above)

    When you create a Time-Driven metric (or a rule), it is almost always activate "Enable Trigger without Data" too.

    I did it for metric svcAvailability

  • followed a WebSphere Enterprise Service Bus

    All,

    I'm watching a cluster (2 knots) WebSphere Enterprise Service Bus (IBM), but I get mixed results.  I have two groups of modules that are very well monitored, however, there are two others who are not. the error I get is 'one or more modules of the SoaEndpointLookupModIID3758 application that is running on the server application.l12276 of cell BSE are not started.' but I see on the administration console that they actually work.  So, my questions are:

    1. Has anyone encountered a similar problem before?
    2. I looked at the document that told me the properties page for javaee surveillance (https://support.quest.com/SolutionDetail.aspx?id=SOL62266) and can these settings be filter the other two groups?  the groups similar supplychain. , application. , support. , and

    The model only the problem is that both groups have massive amounts of alarms and the others are golden color.

    Thanks for the help in advance,

    Kaleb

    A new script was necessary to solve the problem.  We had to use the following to find out what the problem was.

    ===

    com.quest.common.log import. *;

    CAT = LogCategory.getInstance ("JavaEECartridge");

    AVAILABLE = "available";

    PRESUMED_UNAVAILABLE = "PresumedStopped";

    PRESUMED_AVAILABLE = "PresumedStarted";

    Not AVAILABLE = "not available";

    MODULES_STARTED = "modulesStarted";

    MODULES_TARGETED = "modulesTargeted";

    Check for blackout agent

    try {}

    agentID = scope.monitoringAgent?. agentID;

    If (agentID! = 0)

    {

    If (server ['AgentService'] .findById (agentID.toString ()) .getIsBlackedOut ())

    Returns a null value.

    }

    }

    catch (System.Exception e)

    {

    CAT.ignoreException ("WebSphereApplicationInstance.RuntimeState: could not check for agent blackout.", e);

    }

    try {}

    msObs = server.get("DataService").retrieveLatestValue (range, MODULES_STARTED);

    long freshnessTestInMin is registry ("WebSphere_ApplicationState_Freshness_Minutes");.

    No current value for 5 minutes, don't assume demand is declining.

    If ((msObs == null) |) ((currentEvalTime - () .getTime ()) msObs.getEndTime > freshnessTestInMin * 60000) {}

    Return PRESUMED_UNAVAILABLE;

    }

    If (msObs.getValue () .getMin ()! = scope.get (MODULES_TARGETED)) {}

    Return UNAVAILABLE + ":Target:"+scope.get(MODULES_TARGETED)+":Started:"+msObs.getValue().getMin();

    } else {}

    Return AVAILABLE + ":Target:"+scope.get(MODULES_TARGETED)+":Started:"+msObs.getValue().getMin();

    }

    } catch (Exception ex1) {}

    CAT.errorUnexpected ("Derived metric 'WebSphereApplicationInstance.RuntimeState' encountered an error during the evaluation." + ex1.toString ());

    Return PRESUMED_AVAILABLE;

    }

    ===

    the final solution was to adapt the script parameters derived by the following:

    ===

    Thank you for the information.  To correct the problem.  Please make the following change to the metric calculation derived.

    Of

    If (msObs.getValue () .getMin ()! = scope.get (MODULES_TARGETED)) {}

    TO

    If (msObs.getValue () .getMin)< scope.get(modules_targeted))="">

    Please save (2 save the keys to hit).  And once which is recorded, in the collection intervals then 1 or 2 (less than 5 minutes) you should start to see the State properly.  Please let me know if that solves the problem.

    ===

    After that we had to remove all java legecy objects by using the following script

    ===

    topSvc = server.get ("TopologyService");

    OBJS = #! WebSphereCell # .getTopologyObjects ();

    msg = new StringBuilder();

    CELLINPUT = "Cellnames";

    APPINPUT = "ApplicationName";

    for (obj in objs) {}

    Count = 0;

    Cellnames = obj.getName ();

    Msg. Append ("\nWebSphere Cell Name is"). Append (Cellnames);

    println ("name of the WebSphere cell is" + Cellnames);

    If (cellName.equals (CELLINPUT)) {}

    applications = obj.get("applications");

    {(app in the applications)

    appName = app.getName ();

    If (appName.equals (APPINPUT)) {}

    Count ++;

    Msg. Append("\nFound application to delete"). Append (AppName);

    println ("found application to remove" + appName);

    try {}

    instances = app.get("instances");

    for (instance in instances) {}

    topSvc.deleteObject (instance);

    }

    topSvc.deleteObject (app);

    Msg. Append ("\nSuccessfully deleted application instance.");

    println ("instance successfully removed application.");

    } catch (Exception ex1) {}

    Msg. Append("\nException while Deleting application instance:"). Append (EX1);

    println ("Exception when deleting application instance:" + ex1);

    }

    }

    }

    If (County<>

    Msg. Append("\nNo applications with name:"). Append (APPINPUT).append("found_to_be_deleted_in_Cell:").append (CELLINPUT);

    println ("no application with the name:" + APPINPUT + "found in the cell to remove:" + CELLINPUT);

    }

    } else {}

    Msg. Append("...not desired Cell, skipping.:"). Append ("\n");

    println ("... not desired cell, jump");

    }

    }

    Return msg.toString ();

    ===

    I really hope this helps someone out there

  • Groovy - return a value of Scoped

    All,

    This script will be placed in a derived metric which extends the reach of FXMApplicationresults.

    Looking for a little help here. I know that when I return value; Here, I'd get a bunch of data into value. But instead, I get NULL. Is this a normal behavior?

    [code]

    import java.sql.Timestamp.

    import com.quest.wcf.data.wcfdo.SpecificTimeRange;

    Import Java.util;

    def myint = 0;

    end def = System.currentTimeMillis ();

    def start = 1356998400;

    timeRange def = new SpecificTimeRange (new Date (start), new Date (end), 0, 100);

    value = scope.get ("pageDownloadTimeMean", timeRange)

    [/ code]

    This could help.

    import com.quest.wcf.data.wcfdo.SpecificTimeRange;
    end def = new Date () .getTime)
    departure from def = new Date().parse("M/d/yyyy","1/1/2013").getTime)
    def altSpecificTimeRange = new SpecificTimeRange (new Date (start), new Date (end), 0, 100);

    property = ' CPU/hostCPUs/use/period/average '.
    value = scope.get (property, altSpecificTimeRange)
    return [scope:scope.name, scopeType:scope.topologyTypeName, start: start, end: end, altSpecificTimeRange: altSpecificTimeRange, property: property, value: value]

    result

    {scope = Server1, scopeType is VMWVirtualMachine, start = 1357020000000, end = 1357611777198, altSpecificTimeRange = 1 January 2013 12:00:00 CST ^ & % 7 January 2013 8:22:57 PM CST ^ & %0 ^ & property 100% = UC/hostCPUs/use/period/average, value = 40.05888796680498}

Maybe you are looking for