분류 전체보기
-
aws grafana, prometheus 구성_3카테고리 없음 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 구성_2카테고리 없음 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 구성_1카테고리 없음 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_4카테고리 없음 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_3카테고리 없음 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_2카테고리 없음 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": { ..
-
aws Step Functions_1카테고리 없음 2025. 5. 15. 15:48
AWS EC2 AMI 를 S3에 백업하기 위해 Lambda 와 Step Functions 를 사용했다. step functions 은 구성이 어렵지 않고 결과값을 다음 task 에 전달하는게 편했다. 진행 방식Lambda 3개 구성 (ALB 에 연결되어 있는 EC2 만 백업) Lambda 1 : ec2 ami Lambda 2 : create_store_image_task (ami -> s3 임시 디렉토리에 저장)Lambda 3 : s3 임시 디렉토리에 저장된 ami (ex. ami-abcd1234) 구분이 어렵기 때문에 원본 서버 이름으로 변경 후 백업 일자 디렉토리로 copy ami, 스냅샷, 임시 ami 삭제 Lambda 를 구분한 이유는..