전체 글 (220) 썸네일형 리스트형 [Prometheus](AWS)Add Custom rules to Prometheus stack with cloudwatch-exporter Rules에 등록할 Prometheus 쿼리 작성 Cloudwatch-exporter에 추가한 metrics 값을 참고하여 쿼리를 작성한다. 2022.07.11 - [Monitoring/Prometheus] - [Prometheus](AWS)Cloudwatch-exporter에 원하는 metrics 추가하기 EC2 CPU Utilization Over 5 % - 알람 확인을 위해 설정 round(aws_ec2_cpuutilization_average offset 10m, 0.01) > 5 EKS Node CPU Over 80 % round(containerinsights_node_cpu_utilization_average offset 10m,0.01) > 80 ELB Down aws_elb_un_heal.. [Prometheus](AWS)Cloudwatch-exporter multiple projects monitoring with IAM User Concept 모니터링 권한을 가진 IAM user를 이용하면 여러 프로젝트를 한 곳에서, Exporter를 띄워 관리할 수 있다. Create Service Account and Edit permissions Create Policy and Connect with iam user Create Policy name: cloudwatch-exporter cloudwatch-exporter.json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "cloudwatch:GetMetricData", "cloudwatch:ListMetrics", "cloudwatch:GetMetricStatistics", "tag:GetReso.. [Prometheus](AWS)Cloudwatch-exporter에 원하는 metrics 추가하기 cloudwatch-exporter 설치 방법 참고 2022.07.11 - [Monitoring/Prometheus] - [Prometheus](AWS)Install Cloudwatch-exporter with helm chart cloudwatch exporter github https://github.com/prometheus/cloudwatch_exporter Concept cloudwatch-exporter를 사용하면 AWS에서 사용중인 리소스를 모니터링할 수 있다. 다만, Cloudwatch 콘솔과 달리 제공해주는 metrics 값들이 모두 모니터링 가능한 것은 아니라 필요한 데이터 수집에 대한 테스트가 필요하다. 수집 가능한 metrics 확인 하는 방법 AWS CLI로 metrics에 해당하.. [Prometheus](AWS)Install Cloudwatch-exporter with helm chart Get Helm Repository Info and Chart download # Add repo helm repo add prometheus-community https://prometheus-community.github.io/helm-charts helm repo update # Chart download prometheus-community/prometheus-cloudwatch-exporter tar zxvf prometheus-cloudwatch-exporter-0.18.0.tgz Edit values.yaml 30 service.type: LoadBalancer # type: ClusterIP 64 aws.secret.name: sa-for-monitoring-1 # Example 92 co.. [Prometheus](GCP)Stackdriver-exporter multiple projects monitoring with service account Concept 모니터링 권한을 가진 Service Account를 이용하면 여러 프로젝트를 한 곳에서 Exporter를 띄워 관리할 수 있다. Create Service Account and Edit permissions Logs Viewer Monitoring Viewer Prometheus 서버를 GCP에 설치 하는 경우 Service Account에 아래 권한이 필요하다. 나의 경우 GKE로 운영중이고 GKE를 만들때 설정한 SA 계정에서 설정함 노드에서 확인 가능 Service Account User Create Secret from Service Account key Kubernetes Secret 만드는 방법 참고 2022.07.08 - [Kubernetes] - [Kubernetes]How .. [Kubernetes]How to create Kubernetes Secret from Json/Yaml/Literal Concept 비밀번호, OAuth 토큰, SSH 키 같은 민감한 정보들을 저장하는 용도로 사용한다. 이런한 정보들은 컨테이너 안에 저장하지 않고 별도로 보관했다가 실제 파드를 실행할 때의 템플릿으로 컨테이너에 제공한다. Secret Type 내장 시크릿 쿠버네티스 클러스터 안에서 쿠버네티스 API에 접근할 때 사용. 클러스터 안에서 사용하는 ServiceAccount 라는 계정을 생성하면 자동으로 관련 시크릿을 만든다. 이 시크릿으로 ServiceAccount가 사용 권한을 갖는 API에 접근할 수 있다. 사용자 정의 시크릿 How to There are 3 ways to create secret file k create secret generic [file-secret-name] --from-file.. [AWS]AWS CLI 자동완성 설정(AWS CLI Enable Auto Completion) Find aws_completer location dewble@MZC01-JMHAN:~$ which aws_completer /usr/local/bin/aws_completer Add ENV vim ~/.bashrc source ~/.bashrc export PATH=/usr/local/bin/:$PATH complete -C '/usr/local/bin/aws_completer' aws 사용 방법 위 설정 후 tap 키를 누르면 사용할 수 있는 명령어 리스트 또는 명령어 자동완성 기능을 사용할 수 있다. 명령어를 부분적으로 입력하고 Tab $ aws dynamodb dTAB delete-backup describe-global-table delete-item describe-global-table-se.. [AWS]Install AWS CLI in Ubuntu AWS CLI 사용을 위해 IAM 계정 생성 [서비스] - [보안, 자격 증명 규정 준수] - [IAM] - [사용자] - [사용자 추가] 사용자이름: jm.han 액세스 유형: 액세스 키 - 프로그래밍 방식 액세스: CLI 또는 개발도구에서 AWS 자원을 사용하기 위함 암호 : 콘솔에 접속하여 AWS 자원을 사용하기 위함 [기존 정책 직접연결] - [AdministratorAceess] 선택, 다음 [태그 추가(생략가능)] [사용자 만들기] (생성) 프로그래밍 접근을 위한 필요 인증 정보 확인 [.csv 다운로드] AWS CLI 설치 - Linux Windows에 AWS CLI 버전 2 설치 curl "" -o "awscliv2.zip" unzip awscliv2.zip sudo ./aws/instal.. 이전 1 ··· 9 10 11 12 13 14 15 ··· 28 다음