Skip to content

Terraform module to monitoring EC2 instances with Prometheus

Notifications You must be signed in to change notification settings

ErickYataco/terraform-monitoring-ec2

Repository files navigation

Monitoring EC2 Instnaces

Terraform module that provision EC2 instances (monitored) with node exporter to export metrics to Promehteus server (monitor)

Prometheus EC2 Service Discovery

To allow Prometheus Services discovery scrap metrics over monitored instances we need to attached a role with the necesary permissions

ec2-monitor.tf

  assume_role_policy = <<EOF
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Action": "sts:AssumeRole",
      "Principal": {
        "Service": "ec2.amazonaws.com"
      },
      "Effect": "Allow",
      "Sid": ""
    }
  ]
}
EOF

Dashboard example

We uses https://grafana.com/grafana/dashboards/11074

About

Terraform module to monitoring EC2 instances with Prometheus

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published