Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to connect Fargate Instances from AWS and EKS to coroot? #121

Open
franramb opened this issue Nov 30, 2023 · 4 comments
Open

How to connect Fargate Instances from AWS and EKS to coroot? #121

franramb opened this issue Nov 30, 2023 · 4 comments

Comments

@franramb
Copy link

We have multiple applications hosted on AWS EKS and we are monitoring them using coroot. We have seen that automatically the coroot agents are installed on the EC2 instances but not on the Fargate instances:

Screenshot 2023-11-30 at 13 32 45

The installation of coroot has been done using the helm chart.

Could you explain how to deploy the agents in the fargates or if you don't have it implemented, could you consider it?

Thanks a lot!

@bmike78
Copy link

bmike78 commented Dec 1, 2023

I use AWS EKS for Coroot in some of my clusters and the deployment of node-agent is done as a DaemonSet, so your ensured that any new nodes get the agent installed on them.

With Fargate, daemonsets are not supported: https://docs.aws.amazon.com/eks/latest/userguide/fargate.html, so this is why node-agent is not being installed or collecting any data.

node-agent also uses eBPF to gather data. I'm not sure if the AWS Fargate service would give you this level of introspection at the kernel level.

Maybe @def or @apetruhin can answer more about this.

@franramb
Copy link
Author

franramb commented Dec 4, 2023

Thanks @bmike78 for the reply!

According to the AWS documentation, if we want to replace the daemonset, we would have to deploy the agent pod as a sidecar container -> Daemonsets aren't supported on Fargate. If your application requires a daemon, reconfigure that daemon to run as a sidecar container in your Pods.

A sidecar container is: "A sidecar container is a design pattern that allows you to run an additional container alongside your main container in the same pod. The sidecar container can perform tasks that complement the main container, such as synchronising data from a remote source, collecting and sending logs, providing health checks and metrics, directing network traffic, encrypting or decrypting data, or injecting bugs for testing purposes."

Would it be possible for you to consider integrating this agent installation option if there are fargates instances even if you can't collect all the metrics that the daemon itself installed on an ec2 can?

@def
Copy link
Member

def commented Dec 4, 2023

@franramb we've implemented basic support for AWS Fargate in Coroot. It's based on metrics collected by Cadvisor integrated into Fargate "nodes".
Unfortunately, all eBPF-based capabilities are not working for applications deployed to Fargate due to AWS limitations.

Please update Coroot to the latest Helm chart version, as it also contains some changes in the Prometheus config.

For more details, check out this Pull Request along with the associated changes in the chart

@franramb
Copy link
Author

franramb commented Dec 5, 2023

Hello @def ! I just updated coroot and we can already see that the fargates instances are being monitored. Great job!

Wouldn't it be possible to somehow capture the output logs (container logs) from the pods in the fargates (like kubernetes dashboard does) and store them in prometheus?

Thanks a lot for you work and effort, this application is amazing for us :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants