-
Notifications
You must be signed in to change notification settings - Fork 5
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
Setup monitoring of ECS nodes #104
Comments
I think this might be the way: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ec2_sd_config The problem I'm seeing right now is that the monitor server is not in AWS, so we have some issues with the connection between that server and the ec2 instances:
|
To solve 2), I had some talk with @hellais , and we had the idea of using nginx as proxy. You send scrape requests to the nginx proxy and it knows to which host to send it based on the path of the request. For example, if you want to request metrics from the node
After testing this with a docker compose with nginx and two go servers, I think it's possible using the following nginx configuration:
As a side note, you can't use the hostname of the docker service you want to reach, you have to use the local ip address |
This PR adds support for scraping application level metrics straight from the ECS nodes, without going through the load balancer, solving the flapping behavior described in #104 To achieve this we had to solve the following problems: - Reach the cluster nodes in AWS, this was solved by #182 - Discover ECS tasks with their corresponding port and IP address. This was a bit more tricky, we solved it by adding a cronjob that runs a python script that will request ECS data from AWS using the `boto3` client, and then storing that information into a [Prometheus file based discovery](https://prometheus.io/docs/guides/file-sd/) compatible file So, this PR will add: - A Python script to collect ECS tasks information from aws and writing it into a file - An Ansible configuration for creating and running this file with a cronjob - An update to the Nginx configuration used to proxy metrics requests from the monitoring host to the EC2 instances in AWS - Security groups configuration to allow traffic from the proxy host to the ECS cluster nodes - IAM credentials used for requesting tasks information from AWS This PR solves ooni/backend#937 and ooni/backend#938 and is related to #104
Currently we don't have observability into the container host of the ECS cluster. Moreover we are only able to scrape aggregate metrics from the services that are behind the balancer, which means we end up with the metrics "flapping".
Ideally we would have a way of scraping metrics for the container host, but also the per-servicer docker containers.
In summary we would like to collect two classes of metrics:
node_exporter
The text was updated successfully, but these errors were encountered: