1. What
Apigee Edge offers a seamless syslog integration to external logging systems like Loggly, Splunk, SumoLogic etc. You can also send logs to ELK (Elasticsearch, Logstash and Kibana) stack.
Although sending logs to Loggly is straight-forward by implementing out-of-the-box Message Logging Policy, it is little bit challenging when integrating with ELK stack (Elasticsearch, Logstash and Kibana), especially sending JSON log messages to the ELK stack. I have put some efforts in this and tried my best to cover both the ELK stack (Part 1) and Loggly (Part 2) logging in this blog-post. The sole objective of creating these repositories is to help Apigee developers QuickStart external logging with as less configurations as possible.
2. Why
Logs are quite important to track down issues in API runtime environments. Logs can be useful for developers during and after the development phase, especially because they are the ones writing the code and configuring the APIs. Also, it is important for security teams to see if there has been any unauthenticated/unauthorised API access; logging gives the security team all the information they need.
Apigee Edge offers a 10 min or 20 messages trace window (whichever reaches first), so you can trace the live calls to find the issues or capture messages. However that is not sufficient when the API call was made outside of this trace session. You are helpless if you don’t have the logs. Having an Apigee Private Cloud/On-premise subscription, you have full access to the logs, but Apigee Edge Public Cloud subscription you do not have logs. So if you happen to be a Public Cloud Customer, it is highly recommended to send log messages to third-party log management services/or even your on-premise ELK stack to have full and complete insights in your APIs.
3. How
I have created two git repositories, both contain a working demo/api proxy which demonstrates logging to Loggly (Formatted JSON) and ELK Logging.
- Part 1: Apigee Edge – External Message Logging to ELK stack
Repo Link – https://github.com/bhatikuldeep/hello-world-elk-logging - Part 2: Apigee Edge – External Message Logging to Loggly
Repo Link – https://github.com/bhatikuldeep/hello-world-loggly-logging
4. Next
As I mentioned earlier, I have tried to cover what is essential, however if there’s any support required, feel free to contact me via my contact details below.
Related API Management articles & cases
- Apigee featured on TechRadar by Devoteam
- Case study: Progressive Management through Apigee API
- Apigee API Management Lifecycle
- White Paper: The Future of API Management
- The Opportunities with Open Banking, APIs and Integration
- Offer: API Management
- Eneco: using their Apigee API Management Platform the right way
- API management at Liberty Global Inc.
- API Management Architecture – An introduction
Want to learn more about Apigee?
Check out TechRadar by Devoteam to see what our experts say about its viability in the market.