Home > front end >  Should I use DaemonSet or Deployment for prometheus cwagent for Fluent Bit metrics scraping
Should I use DaemonSet or Deployment for prometheus cwagent for Fluent Bit metrics scraping

Time:04-09

I am trying to set up a Prometheus CloudWatch agent to scrape metrics from Fluent Bit that is running on Amazon EKS. I am following this guide to set up a CloudWatch agent with Prometheus: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/ContainerInsights-Prometheus-Setup-configure.html. In this guide prometheus agent is created as a Deployment.

My Fluent Bit is deployed as DaemonSet on EKS. I've read this answer that explains difference of Deployment vs DaemonSet: Difference between daemonsets and deployments

But I still have hard time understanding of what is the best to use for prometheus agent. The way I see it, since Fluent Bit is a DaemonSet, I would want Prometheus agent to be a DaemonSet too to make sure it will grab metrics from those PODs that might spawn in Fluent Bit. Am I right?

CodePudding user response:

...since Fluent Bit is a DaemonSet, I would want Prometheus agent to be a DaemonSet too to make sure it will grab metrics from those PODs that might spawn in Fluent Bit. Am I right?

This is correct in order to scrap from every FluentBit agent in your cluster and adapt to situation where node(s) scale out/in.

  • Related