DX Application Performance Management

Expand all | Collapse all

EPAgent : Creation of custom metrics

  • 1.  EPAgent : Creation of custom metrics

    Posted Nov 14, 2016 03:14 AM

    Hi Team,

     

    I have APM 10.2 installed on windows server 2008 R2 in my environment. I have enabled EPAgent and trying to create custom metrics in EPAgent.

    I am following the document to create custom metrics.

    EPAgent 101: Use the SDK to Send Data to APM 

    But unable to create the custom metrics.

    Kindly help me in creating the custom metrics in EPAgent.

     

    Thanks and Regards,

    AnuRanjan Kumar



  • 2.  Re: EPAgent : Creation of custom metrics

    Broadcom Employee
    Posted Nov 14, 2016 03:19 AM

    Please provide details on what type of data are you trying to send to APM and put a copy of your code in your reply.



  • 3.  Re: EPAgent : Creation of custom metrics

    Posted Nov 14, 2016 03:23 AM

    Hi Haruhiko,

     

    I am trying to send sample data to APM. And trying with the following code.

     

     

    Regards,

    AnuRanjan Kumar



  • 4.  Re: EPAgent : Creation of custom metrics

    Broadcom Employee
    Posted Nov 14, 2016 03:26 AM

    This doesn't show how you've made your socket connection to EPA.

     

    Can you show that, and have you verified that you have made a successful connection?

     

    What language are you using to write this program?



  • 5.  Re: EPAgent : Creation of custom metrics

    Posted Nov 14, 2016 03:31 AM

    Hi Haruhiko,

     

    How to verify for successful connection?? Plz reply

     

    java is the language for writing the program.

     

    Thanks,

    AnuRanjan Kumar



  • 6.  Re: EPAgent : Creation of custom metrics

    Broadcom Employee
    Posted Nov 14, 2016 03:41 AM

    Did you execute line 21 to send your data? What was the result?



  • 7.  Re: EPAgent : Creation of custom metrics

    Posted Nov 14, 2016 04:30 AM

    Hi Haruhiko,

     

    Not yet executed any of the code.  Plz suggest the way to execute .

    As i am new to EPAgent. Kindly reply.

     

    Thanks,

    AnuRanjan Kumar



  • 8.  Re: EPAgent : Creation of custom metrics
    Best Answer

    Posted Nov 14, 2016 09:22 AM

    AnuRanjan,

     

    There are multiple ways to send data to APM.  One of the most common is to use the EPAgent as your communication host and then develop plug-ins into the epagent.  The other ways is to open a RESTful or socket connection directly to APM and send the XML metric form through.

     

    Which method are you trying to do?

     

    If you are using the Epagent plugin method, could you provide the IntroscopeEPAgent.properties file to insure that you have the Java plugin configured?

     

    If you are using the Restful or socket methods, could you provide the additional Java code to open a socket connection to the Enterprise Manager/Collector and the code that writes the metric XML to the connection?

     

    Hopefully this is helpful,

    Billy



  • 9.  Re: EPAgent : Creation of custom metrics

    Posted Nov 15, 2016 02:47 AM

    Hi Billy,

     

    Thanks for your valuable suggestion. I am trying through socket connection.

    Plzz elaborate about additional java code to open a socket connection to EM/Collector.

     

    Regards,

    AnuRanjan Kumar



  • 10.  Re: EPAgent : Creation of custom metrics

    Posted Nov 15, 2016 07:49 AM

    EPAgent 101 : Use the SDK to Send Data to APM

    https://communities.ca.com/docs/DOC-231150915

     

    Create Custom Plug-ins with EPAgent

    https://docops.ca.com/ca-apm/10/en/implementing-agents/ep-agent/create-custom-plug-ins-with-epagent

     

    You could use the default Plug-in metrics as example on how to extend the EPAgent

    https://docops.ca.com/ca-apm/10/en/implementing-agents/ep-agent/epagent-default-plug-in-metrics



  • 11.  Re: EPAgent : Creation of custom metrics

    Broadcom Employee
    Posted Nov 14, 2016 10:32 AM

    If you follow the example on the thread, you can verify sending data successfully using curl:

     

    michaels-macbook-pro:tmp mwalker$ curl -H "Content-Type: application/json" --data @epagent_rest_sample.json http://centos64rt2.ca.com:8080/apm/metricFeed

     

    Once you've verified that your EPA is listening and receiving data, move to the Java example provided in the thread to see how you can send the same data.



  • 12.  Re: EPAgent : Creation of custom metrics

    Posted Nov 15, 2016 03:06 AM

    Hi Haruhiko,

     

    Thanks for your valuable suggestion. I will try with both thw methods.

     

    Regards,

    AnuRanjan Kumar



  • 13.  Re: EPAgent : Creation of custom metrics

    Broadcom Employee
    Posted Nov 15, 2016 07:39 AM

    This is getting deep into customization. If this was earlier in the thread, would make a discussion. The initial question was answered and now we are getting into follow-up questions such as to bwcole on additional java code to open a socket connection to EM/Collector..