AWS
-
aws grafana, prometheus 구성_5AWS 2025. 5. 26. 18:35
RDS 모니터링 구성EC2 와 다르지 않다. 기존에 받았던 cloudwatch_exporter 의 examples/RDS.yml 사용cp -r a_account_ec2/ a_acount_rdscd a_acount_rdscp examples/RDS.yml ./config.yml 아래 주석이 없는 3가지만 모니터링 할 예정region: us-west-2role_arn: arn:aws:iam::acount_id:role/cloudwatch_exporter_rolemetrics:#- aws_dimensions:# - DBInstanceIdentifier# aws_metric_name: DatabaseConnections# aws_namespace: AWS/RDS# aws_statistics:# - Ma..
-
aws grafana, prometheus 구성_4AWS 2025. 5. 26. 11:45
이번에는 ec2 여러 대를 모니터링 하기 위해 수정 신규 서버 : ec2 생성 → cloudwatch agent 설치, IAM role 적용모니터링 서버 : a_acount_ec2 컨테이너 수정 → prometheus 수정 → grafana 수정 cloudwatch agent 설치와 IAM role 적용이 완료되면콘솔 - cloudwatch - 지표 - 모든 지표에서 instance id 로 검색 시 아래처럼 나오면 완료. 서버 name tag : abcd-1cloudwatch exporter 의 config.yml 변경$ docker exec -it a_acount_ec2 /bin/sh$ vi config/config.ymlregion: us-west-2role_arn: arn:aws:iam::acco..
-
aws grafana, prometheus 구성_3AWS 2025. 5. 22. 18:16
이제 grafana 를 구성한다. 모니터링 서버docker run -d --name=grafana -p 3000:3000 grafana/grafanaAWS 작업콘솔 - 모니터링 서버 우클릭 - 보안 - 보안 그룹 변경 - 3000 포트 열기모니터링 서버 ip:3000 admin / admin 으로 접속 후 Coneections - Data sources - prometheus prometheus 가 실행되고 있는 서버 ip (여기선 prometheus 와 grafana 가 같은 서버에서 실행되고 있음) 아래에 save & test 클릭 Grafana 대시보드 구성 import 해와도 되지만 간단하게 구성해보기 prometheus 클릭 오류쿼리를 입력했는데 아무 값이 안 뜨길래 확인해보니1. 해..
-
aws grafana, prometheus 구성_2AWS 2025. 5. 22. 14:48
모니터링 서버 https://github.com/prometheus/cloudwatch_exporter GitHub - prometheus/cloudwatch_exporter: Metrics exporter for Amazon AWS CloudWatchMetrics exporter for Amazon AWS CloudWatch. Contribute to prometheus/cloudwatch_exporter development by creating an account on GitHub.github.com여기서 받아온 파일에서 약간 수정 cd /home/ec2-user/a_account_ec2vi DockerfileFROM eclipse-temurin:21-jdk-noble as builderSHELL ..
-
aws grafana, prometheus 구성_1AWS 2025. 5. 22. 12:01
grafana, prometheus, docker 를 이용해 다중 계정 ec2 , rds, elasticache 모니터링을 하려한다.서버에 exporter 를 구성하는 방식이 아닌 cloudwatch 를 읽어오는 방식이다.다른 계정의 cloudwatch 도 가져올 수 있어 한눈에 모든 서버를 모니터링 할 수 있다. cloudwatch exporter 모니터링 서버 설정sudo yum install -y gitgit clone https://github.com/prometheus/cloudwatch_exporter.gitsudo yum install -y java-17-amazon-corretto.x86_64sudo yum install -y java-17-amazon-corretto-devel.x86_6..
-
aws Step Functions_4AWS 2025. 5. 15. 16:19
ec2 ami 백업 자동화를 하면서 iam 권한 문제가 있었다. ec2 권한 뿐만 아니라 ebs 권한도 있어야 s3 로 백업이 가능해진다.{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:DeleteObject", "s3:GetObject", "s3:ListBucket", "s3:PutObject", "s3:PutObjectTagging", "s3:AbortMultipartUpload" ..
-
aws Step Functions_3AWS 2025. 5. 15. 16:13
https://plli.tistory.com/36 aws Step Functions_1AWS EC2 AMI 를 S3에 백업하기 위해 Lambda 와 Step Functions 를 사용했다. step functions 은 구성이 어렵지 않고 결과값을 다음 task 에 전달하는게 편했다. 진행 방식Lambda 3개 구성 (ALB 에 연결되어 있는 EC2 만plli.tistory.com https://plli.tistory.com/37 aws Step Functions_2https://plli.tistory.com/36aws Step Functions_1 에 이어서 작성람다 1 에 관한 step function{ "Comment": "A description of my state machine", "Start..
-
aws Step Functions_2AWS 2025. 5. 15. 15:51
https://plli.tistory.com/36aws Step Functions_1 에 이어서 작성람다 1 에 관한 step function{ "Comment": "A description of my state machine", "StartAt": "ec2_ami_backup-1_create_ami", "States": { "ec2_ami_backup-1_create_ami": { "Type": "Task", "Resource": "arn:aws:states:::lambda:invoke", // 해당 람다 실행 후 결과값을 다음 람다에 전달 "Output": "{% $states.result.Payload %}", "Arguments": { ..