DX Application Performance Management

Expand all | Collapse all

Send UIM metrics to EPAgent using probe apmgtw

  • 1.  Send UIM metrics to EPAgent using probe apmgtw

    Posted Sep 21, 2018 12:07 PM

    Hi,

     

    I'm going to send the metric from sqlserver probe to EPAgent using apmgtw probe

     

    The apmgtw already collected the metrics from sqlserver probe, but the apmgtw does not send the collected metrics to EPAgent. in the apmgtw log I see the message "Sending Metric to EP Agent: ERROR". 

     

    In the apmgtw, I have to define the APM connection details.

    Since the integration uses probe apmgtw, should i need to define the rest api too?

    If so, is there any example of the REST API to send metrics from any UIM probes to EPAgent?

     

    Need advice please...

     

    Regards

    Rio



  • 2.  Re: Send UIM metrics to EPAgent using probe apmgtw

    Broadcom Employee
    Posted Sep 21, 2018 01:41 PM


  • 3.  Re: Send UIM metrics to EPAgent using probe apmgtw

    Posted Sep 21, 2018 02:26 PM

    Hi Hallet,

     

    Yes I have read those articles. That I wanted is sending the collected metrics from sqlserver probe (UIM) to APM using apmgtw probe.

    To enable the apmgtw integration we need EPAgent be installed.

    apmgtw AC Configuration - CA Unified Infrastructure Management Probes - CA Technologies Documentation 

    Hopefully somebody here or from UIM community can share the experiences on UIM - APM integration using apmgtw.

     

    Regards.

    Rio



  • 4.  Re: Send UIM metrics to EPAgent using probe apmgtw

    Broadcom Employee
    Posted Sep 23, 2018 06:29 PM

    Hi Rio,

    As you probably read the UIM/APM integration uses the EPAgent HTTP/REST interface.

    apmgtw AC Configuration - CA Unified Infrastructure Management Probes - CA Technologies Documentation 

    Configure the Standalone EPAgent RESTful Interface - CA Application Performance Management - 10.7 - CA Technologies Docu… 

    However in IntroscopeEPAgent.properties OOTB the HTTP/REST interface is disabled by default, so have you enabled it?

    # Network port on which to listen for HTTP GET commands. If commented out or
    # left unconfigured then EPAgent will not listen for HTTP commands
    #
    #introscope.epagent.config.httpServerPort=

     

    Also check the firewall is open between UIM and EPAgent machine for your HTTP/REST port

     

    Independent of UIM you can verify the health of EPAgent HTTP/REST interface using this old 101 guide from Chris_Kline

    https://communities.ca.com/docs/DOC-231150915-epagent-101-use-the-sdk-to-send-data-to-apm#jive_content_id_RESTful_API_HTTP_POST

    e.g. you can load the data from "epagent_rest_sample.json" using this curl command
    curl -H "Content-Type: application/json" --data @epagent_rest_sample.json http://EPAGENT_HOST:8080/apm/metricFeed

    Then verify it is displayed in WebView.

     

     

    Hope that helps

     

    Regards,

     

    Lynn



  • 5.  Re: Send UIM metrics to EPAgent using probe apmgtw

    Posted Sep 23, 2018 10:49 PM

    Hi Lynn,

     

    Yes I have enabled the property introscope.epagent.config.httpServerPort=.

    And I give port value as 8080. so the property is introscope.epagent.config.httpServerPort=8080.

    The UIM and EPagent firewalls are open. The integration is between Windows OS.

     

    The apmgtw log that I collected on Sept 21, received these log
    Sep 21 15:32:37:406 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 0(4) buffer id :1 time: 0
    Sep 21 15:32:37:458 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 0(4) buffer id :2 time: 0
    Sep 21 15:32:38:372 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 0(28) buffer id time: 1
    Sep 21 15:32:44:968 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 0(24) buffer id :1 time: 0
    Sep 21 15:32:44:980 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 0(11) buffer id :2 time: 0
    Sep 21 15:32:44:992 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 0(2) buffer id time: 0
    Sep 21 15:32:45:007 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 0(1) buffer id :1 time: 0
    Sep 21 15:32:45:019 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 0(2) buffer id :2 time: 0
    Sep 21 15:32:45:032 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 10(11) buffer id time: 1
    Sep 21 15:32:45:044 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 11(11) buffer id :1 time: 0
    Sep 21 15:32:45:056 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 11(11) buffer id :2 time: 0
    Sep 21 15:32:45:059 [pool-9-thread-5, apmgtw] ***Sent to EPAgent per request: Success msg.count=(0), Failed msg.count=(0), Time taken=(27)milisec
    Sep 21 15:32:45:059 [Thread-2, apmgtw] Sending Metric to EP Agent: ERROR
    Sep 21 15:32:45:059 [Thread-2, apmgtw] Consumer Thread: sent with count 152 in 35639(ms), NULL QoS count 0
    Sep 21 15:32:45:065 [pool-9-thread-4, apmgtw] ***Sent to EPAgent per request: Success msg.count=(0), Failed msg.count=(0), Time taken=(20)milisec
    Sep 21 15:32:45:065 [Thread-3, apmgtw] Sending Metric to EP Agent: ERROR
    Sep 21 15:32:45:066 [Thread-3, apmgtw] Consumer Thread: sent with count 150 in 35635(ms), NULL QoS count 0
    Sep 21 15:32:45:068 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 10(10) buffer id time: 0
    Sep 21 15:32:45:076 [pool-9-thread-1, apmgtw] ***Sent to EPAgent per request: Success msg.count=(0), Failed msg.count=(0), Time taken=(18)milisec
    Sep 21 15:32:45:077 [Thread-4, apmgtw] Sending Metric to EP Agent: ERROR
    Sep 21 15:32:45:077 [Thread-4, apmgtw] Consumer Thread: sent with count 165 in 35632(ms), NULL QoS count 0
    Sep 21 15:32:45:080 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 7(7) buffer id :1 time: 0
    Sep 21 15:32:45:093 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 11(11) buffer id :2 time: 0
    Sep 21 15:32:45:105 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 9(9) buffer id time: 0
    Sep 21 15:32:45:117 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 12(12) buffer id :1 time: 0
    Sep 21 15:32:45:130 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 11(11) buffer id :2 time: 0
    Sep 21 15:32:45:143 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 12(12) buffer id time: 0
    Sep 21 15:32:45:155 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 11(11) buffer id :1 time: 0
    Sep 21 15:32:45:172 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 14(14) buffer id :2 time: 1
    Sep 21 15:32:45:187 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 12(12) buffer id time: 1
    Sep 21 15:32:45:198 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 2(2) buffer id :1 time: 0
    Sep 21 15:32:45:210 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 9(9) buffer id :2 time: 0
    Sep 21 15:32:45:223 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 8(8) buffer id time: 0
    Sep 21 15:32:45:235 [pool-8-thread-2, apmgtw] Producer Thread: recvd message count: 12(12) buffer id :1 time: 0
    Sep 21 15:32:45:248 [pool-8-thread-3, apmgtw] Producer Thread: recvd message count: 8(8) buffer id :2 time: 1

     

    It seems the apmgtw already collected the sqlserver probe metrics, but error when send it to EPAgent..

     

    Regards

    Rio



  • 6.  Re: Send UIM metrics to EPAgent using probe apmgtw
    Best Answer

    Broadcom Employee
    Posted Sep 23, 2018 11:08 PM

    Hi Rio,

    Strangely it always shows "Success msg.count=(0), Failed msg.count=(0)" when you would expect "Failed msg.count" to be > 0.

    If you have confirmed the health of EPAgent REST interface independent of UIM per my suggestion above,  then at this stage it appears to be a UIM side problem. I would suggest to create a support case for UIM and please refer to this community thread when you log the case. UIM Support team can then liaise with APM Support team if they need to.

    Thanks

    Lynn



  • 7.  Re: Send UIM metrics to EPAgent using probe apmgtw

    Posted Sep 23, 2018 11:16 PM

    Hi Lynn,

     

    Thank you for your advise. I create a ticket to UIM team now.



  • 8.  Re: Send UIM metrics to EPAgent using probe apmgtw

    Posted Sep 26, 2018 06:29 AM

    Hi all,

     

    It resolved already.

    1. In the EPAgent profile, I changed the httpServerPort to 8080 to 8085 (introscope.epagent.config.httpServerPort=8085)

    2. From apmgtw probe configuration, change the port 8080 to 8085 as well (http://***.***.***.***:8085/apm/metricFeed)

     3. See the several screenshot for the result in CA APM:

      

     

     

    Regards,

    Rio



  • 9.  Re: Send UIM metrics to EPAgent using probe apmgtw

    Broadcom Employee
    Posted Sep 26, 2018 06:21 PM

    Hi Rio,

    Glad to hear the problem is resolved.

    I worked a little with Frank on your case.

    In one of screenshots you uploaded for url "http://EPAGENT_HOST:8080/apm/metricFeed" it showed:

     

    HTTP ERROR 404
    Problem accessing /apm/metricFeed. Reason:

    NOT_FOUND
    ---------
    Powered by jetty://


    So it looks to me like there was a different jetty web server running on port 8080 which did not recognise the page /apm/metricFeed. Did you perhaps install EPAgent on the same machine as APM WebView because by default WebView runs on port 8080 so that might explain the conflict?

     

    Regards,

     

    Lynn



  • 10.  Re: Send UIM metrics to EPAgent using probe apmgtw

    Broadcom Employee
    Posted Sep 26, 2018 06:32 PM

    Also for future reference to test the heath of the EPAgent htpp/REST interface health quick checks are:

    1. Testing http://EPAGENT_HOST:8080/apm/metricFeed from Chrome browser:
    If EPAgent http/REST port is down or not accessible the result will be as follows:
    This site can’t be reached
    willy03-i2438 refused to connect.
    Search Google for willy03 2438 9080 apm metric Feed
    ERR_CONNECTION_REFUSED

     

    If EPAgent http/REST port is up and accessible the result will be as follows (only POST is supported):
    HTTP ERROR: 405
    Problem accessing /apm/metricFeed. Reason:

    HTTP method GET is not supported by this URL

    -------
    Powered by Jetty://

     

    2. Similarly can also check the same with curl installed on Linux or on Windows (On Windows can install it via Mingw-64 from https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer)

    My EPAgent running http porton  9080 shows:
    C:\Program Files\Git\mingw64\bin>curl -I http://EPAGENT_HOST:9080/apm/metricFeed
    HTTP/1.1 405 HTTP method GET is not supported by this URL
    Cache-Control: must-revalidate,no-cache,no-store
    Content-Type: text/html;charset=ISO-8859-1
    Content-Length: 1351

     

    Also using curl command with POST and a valid payload:
    C:\Program Files\Git\mingw64\bin>curl -k -X POST http://EPAGENT_HOST:9080/apm/metricFeed -H "Content-Type:application/json; charset=UTF-8" -d "{\"metrics\":[{\"type\":\"IntCounter\", \"name\":\"Time (µs)\", \"value\":"12"}]}"

     {"validCount":1}

     

    Hope that helps

     

    Regards,

     

    Lynn



  • 11.  Re: Send UIM metrics to EPAgent using probe apmgtw

    Broadcom Employee
    Posted Sep 26, 2018 09:51 PM

    Added KB which also includes potential conflict warning when EPAgent is installed on same machine as Enterprise Manager with WebView running on default port 8080:

    How to health check the EPAgent HTTP RESTful inter - CA Knowledge 

     

    I will also raise a case to request a documentation update to add that warning to the docops.