DX Application Performance Management

  • 1.  JavaScript Calculator ? Calculate result based on 2 metrics

    Posted Dec 15, 2009 05:32 AM
    Finally, I managed to get here!!    I'm trying to achieve something at the moment and not sure if it can be done.    I'm running introscope 8.1 on a WebLogic 8.1 environment. I have a number of messages on a queue, and an MDB that's taking them off the queue.       This MDB has a response time, currently of 15s and what I was hoping to do was to use a javascript calculator or something to multiply the number of messages on the queue with the response time and calculate an estimated time to clear the messages based on the current response time.     Hopefully that makes sense and if anyone has any suggestions, that would be great.     Pete   


  • 2.  Re: JavaScript Calculator ? Calculate result based on 2 metrics

    Broadcom Employee
    Posted Dec 15, 2009 12:32 PM
      |   view attached
    Hello Peter,I have updated  the sample javascript "{EM_HOME\examples\scriptsHeapUsedPercentage.js" in order to  simulate that you are looking.Please find attached  the  modified js and a screenshot displaying the results.I have put some comments in the javascript for you to know which lines need to be updated.  I hope this helps,  Regards,  Sergio

    Attachment(s)

    zip
    testresult.zip   27 KB 1 version


  • 3.  Re: JavaScript Calculator ? Calculate result based on 2 metrics

    Posted Dec 16, 2009 12:06 AM
      |   view attached
    Hi Sergio,  Thanks for your quick reply - I can see how that would work, but my problem is, the metrics come from two different parts of the investigator tree. There are a couple of screenshots which should explain it.  I'm thinging along the lines of the web service add-on for the EM at the moment and maybe using the EPA in some way - unless there's a better way?  Pete  

    Attachment(s)

    zip
    Investigator Tree.zip   59 KB 1 version


  • 4.  Re: JavaScript Calculator ? Calculate result based on 2 metrics

    Broadcom Employee
    Posted Dec 16, 2009 01:16 PM
      |   view attached
    Hello Peter,Please find attached another example using metrics from different paths (CPU:Processor Count * ProbedHelloWorld1|ProbedHelloWorld|queue:Responses Per Interval).They key is to use the right metric regexp.I hope this helps,  Regards,Sergio

    Attachment(s)

    zip
    test2.zip   34 KB 1 version


  • 5.  Re: JavaScript Calculator ? Calculate result based on 2 metrics

    Posted Dec 17, 2009 01:03 PM
    This is absolutely perfect! I've made some changes, and it looks OK. I've got no data at this time of night to see it working, but tomorrow I should.  What is the correct way of defining the metric regex for the agentbelow - I'm only interested in metrics coming from that specific agent.  SuperDomain/Destin8PRD|D8PRDWLS04|WebLogic|WLS08  and I'm having trouble filling this bit in    function getAgentRegex()
    {
          // *** is currently matching all agents
          return "(.*)D8PRDWLS04|WLS08(.*)";
    }
     Pete


  • 6.  Re: JavaScript Calculator ? Calculate result based on 2 metrics
    Best Answer

    Broadcom Employee
    Posted Dec 18, 2009 05:05 AM
    Hello Peter,I believe the correct syntax would be.      function getAgentRegex()
    {
          // *** is currently matching all agents
          return "(.*)D8PRDWLS04\\|WebLogic\\|WLS08(.*)";
    }  I have done some preliminar tests and this seems to be working fine. I hope this helps,  Regards,  Sergio