Apigee is an API management platform that enables developers and businesses to design, secure, deploy, monitor, and scale APIs. This extension makes it possible for AppDynamics customers to monitor the performance of Apigee API proxies (or services as some people prefer to call it).Apigee performance metrics in AppDynamics will help customers to quickly isolate the root cause of a performance issue - whether it is Apigee's overhead and/or the backend (target) service.
Metrics that are collected for each API proxy are :
- Response Time: Total number of milliseconds it took to respond to a call. This time includes the Apigee API proxy overhead and your target server time.
- Target Response Time: Number of milliseconds it took your target server to respond to a call. This number tells you how your own servers are behaving.
- Request Processing Latency: Number of milliseconds from the time when a call reaches the selected API proxy to the time when Apigee sends the call to your target server.
- This extension works only with the standalone Java machine agent.
- Analytics module must be enabled in Apigee
- Create a service account in Apigee that has read access to all ALL the API proxies you would like to monitor in AppDynamics
- jq must be installed on the server running the machine agent - https://stedolan.github.io/jq/download/
- Unzip the attached file into $MACHINE_AGENT_HOME/monitors
- Using your favourite text editor, open config.json and fill in the connection details
Note: user_proxy_filter, when set to true will ONLY send API performance metrics for the predefined proxies in the apiproxy.conf file. if set to false, performance data for ALL apigee proxies will be sent.
- Make the script executable:
chmod +x apigee_monitor.sh
- Test it:
./apigee_monitor.sh
- If everything is OK, you should see an output in stdout that is similar to this:
==> from 01/23/2018+22:53:40 to 01/23/2018+23:03:40 curl -X GET https://api.enterprise.apigee.com/v1/organizations/io/environments/test/stats/apiproxy?_optimized=js&realtime=true&limit=300&select=sum(message_count),avg(total_response_time),avg(target_response_time),avg(request_processing_latency),sum(is_error)&sort=DESC&sortby=sum(message_count),avg(total_response_time),sum(is_error)&timeRange=01/23/2018+22:53:40~01/23/2018+23:03:40&timeUnit=minute&tsAscending=true ==> 200 name=Custom Metrics|Apigee|Proxies|[proxy name]|Availability, value=1 name=Custom Metrics|Apigee|Proxies|[proxy name]|Average Response Time, value=501 name=Custom Metrics|Apigee|Proxies|[proxy name]|Request Processing Latency, value=25 name=Custom Metrics|Apigee|Proxies|[proxy name]|Target Response Time, value=474
- Restart the machine agent
The custom dashboard below shows 2 API proxy performance metrics - with their respective SLAs
Metrics are located in Application Infrastructure Performance | Tier_NAME| Custom Metrics | Apigee |*
Review $MACHINE_AGENT_HOME/logs/apigee-monitor.log
Send a manaul curl request to your apigee instance to verify it's working
- Fork and submit PR