Hello All,
I am trying monitor docker swarm cluster using Prometheus and AWS Cloudwatch.
I was able to monitor same using Grafana dashboard, however I need to publish metrics in Cloudwatch. Does anyone has any idea, how can this be achieved.
Share and learn in the Docker community.
Hello All,
I am trying monitor docker swarm cluster using Prometheus and AWS Cloudwatch.
I was able to monitor same using Grafana dashboard, however I need to publish metrics in Cloudwatch. Does anyone has any idea, how can this be achieved.
One way to get metrics into the Cloudwatch is to use the awslogs-driver for Docker. That will send all your loggings to Cloudwatch. From there, you can filter out the metrics as you would do with any AWS resources. See https://docs.docker.com/config/containers/logging/awslogs/
{
"log-driver": "awslogs",
"log-opts": {
"awslogs-region": "us-east-1"
}
}
However, that is not really what I think you want to do, since that is for all logging and not really the metrics collected in Prometheus by the Prometheus agents.
The other option is to use an adapter that takes the Prometheus data and push it into Cloudwatch. Theoretically, you could just use Prometheus Remote Write Path (https://prometheus.io/docs/prometheus/latest/configuration/configuration/#remote_write) and use Cloudwatch as an endpoint (Using the Cloudwatch API https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html). But… The formats are not compatible and you can’t configure the AWS key/tokens in the remote_write.
Our pals at Cloudposse has solved that.
Take a look at https://github.com/cloudposse/prometheus-to-cloudwatch
Hi @deepsonune
I am trying to monitor the docker swarm cluster using Prometheus. Prometheus and grafana are already configured and running in my environment. What do I need to install further to enable swarm monitoring?
A quick response will be appreciated.
Thanks