Microservices are great to run in cloud-native environments and provide the flexibility to adapt to businesses’ ever-changing needs. Organizations have the opportunity to gain competitive advantages using these microservices-based environments. 

The environments, such as various cloud providers (AWS) and Kubernetes, used to run or orchestrate the microservices have thus become a critical part of an organization’s architecture. Hence, it has become quintessential to monitor these environments and the microservices that they enable run.

Using an intelligent distributed tracing-based solution you can understand different environments and quickly troubleshoot any errors, thus reducing your mean time to detection and resolution (MTTD/R).  In this blog, we explore how you can integrate and monitor various microservices-based environments using Epsagon.

Integrating and Monitoring Microservices-based Environments

Epsagon supports various environments that enable the orchestration of microservices. It automatically scans for resources, metrics, logs, issues, and alerts to provide you with predefined dashboards for monitoring and troubleshooting.

Integrating Environments

Epsagon supports monitoring and troubleshooting for the following environments:

  1. AWS
  2. Kubernetes
  3. Apache OpenWhisk

Figure 1: Environments Supported by Epsagon

Integrating AWS

You can integrate multiple AWS accounts with Epsagon. First, from your Epsagon portal, navigate to Settings->Integrations and select AWS. 

Figure 2: AWS integration with Epsagon

Now all you need to do is deploy a CloudFormation stack from the AWS account you want to integrate and follow the on-screen instructions.

Figure 3: CloudFormation Stack Deployment

That’s it! Your AWS environment is integrated with Epsagon.

Integrating Kubernetes

With Epsagon, you can monitor your (cloud-managed or on-premises) Kubernetes cluster’s various components such as deployments, nodes, pods, and containers. Similar to integrating multiple AWS accounts as described above, you can incorporate numerous Kubernetes clusters with Epsagon.

Navigate to the Kubernetes menu and copy the command shown (which includes your specific Epsagon token) and run it in your bash prompt.

Figure 4: Integrating Kubernetes Clusters with Epsagon

Kubernetes integration can be done via the command line by running the following command:

curl -L -o epsagon_k8s.sh https://k8s.epsagon.com && chmod +x epsagon_k8s.sh && ./epsagon_k8s.sh <epsagon_token>

This command will add an Epsagon Cluster Role attached to a Service Account to every cluster found. It allows it to read resources from the cluster (pods, deployments, etc.). The clusters to integrate are taken from your kubeconfig file (~/.kube/config).

You can then see all your clusters in the UI when you click on the Kubernetes icon in the left menubar.

Figure 5: Kubernetes Cluster in Epsagon

Integrating OpenWhisk

Similarly, for OpenWhisk, you can integrate multiple environments. First, obtain the auth key:

wsk property get --auth | cut -c13-

Then, from your Epsagon portal, go to the Settings->Integrations menu and select OpenWhisk

Figure 6: Integrating OpenWhisk in Epsagon

Fill in your API host and Auth Key that you obtained above and click on Save. 

Figure 7: OpenWhisk configuration in Epsagon

That’s it! You can now see your OpenWhisk environment using the UI or accessing – app.epsagon.com/actions

Monitoring Environments

With Epsagon, you can monitor all the supported environments in great detail. For example, for Kubernetes (including EKS, Rancher, or any on-premises Kubernetes deployment as long as you can whitelist the IPs), you can monitor the environment at different levels such as cluster, node, container, and deployment.

Figure 8: Monitoring Kubernetes with Epsagon

You can also correlate traces with their respective pods.

Figure 9: Correlate Traces and Pods

With the trace search, you can drill down on specific traces related to the pod. From trace search, you can select a particular trace and view all the information related to that trace, including the exact container associated with the trace and all the environment information.

Figure 10: Information about Traces within a Kubernetes Environment

Similarly, for ECS, you can monitor and view corresponding traces at cluster, service, instance, or task levels. 

Figure 11: Monitoring ECS with Epsagon

You can also correlate your traces with logs and also explore task logs from the ECS UI.

Figure 12: View Correlated Traces and Logs for ECS Tasks

For AWS Lambda environments, you can visualize all your functions in one place. Epsagon can load and search all your functions within a couple of seconds!

Figure 13: Monitoring Lambda Environment with Epsagon

Within the Lambda environment, you can drill down on a particular function and get details such as the number of invocations, memory usage, and duration. You can also view the corresponding logs from here.

Figure 14: Lambda Function Monitoring

Using OOTB Dashboards

Epsagon comes with OOTB dashboards that help you easily track the environments. For Kubernetes/ECS, you can quickly check the CPU and memory usage and pod/task status, whereas, for Lambda functions, you get the number of invocations, errors, and cost, all in one place.

Figure 15: OOTB Dashboards for Kubernetes, ECS, and Lambda

Creating Alerts on Environment Metrics

Epsagon lets you create alerts with the platform of your choice, including PagerDuty, Slack, Teams, etc. For Kubernetes-specific alerts, you can monitor and create alerts based on different metrics such as CPU utilization, memory usage, etc.

Figure 16: Alerts on Kubernetes Metrics

Whereas for Lambda environments, you can create alerts based on events such as Out of memory, Errors, etc.

Figure 17: Alerts on Lambda Events

Conclusion

Monitoring microservices-based environments is not a trivial task. Every organization should use the best platforms out there to help them monitor such complex and highly-scalable environments. With Epsagon’s ability to seamlessly monitor microservices-based environments, correlate traces to environments and make the associated logs quickly available, organizations can expect a significant increase in developer and business velocity.

To take the next step, start your Epsagon 14-day free trial here. To learn more about integrating and monitoring your microservices-based environments with Epsagon, check out the onboarding documentation here.

Other Resources:

Read More:

How to Troubleshoot API Errors with Epsagon

Monitoring Amazon ECS Clusters with Epsagon

Monitoring Managed Cloud Services with Distributed Tracing