Observability/Prometheus (11) 썸네일형 리스트형 [Prometheus](GCP)Stackdriver-exporter에 원하는 metrics 추가하기 Stackdriver-exporter 설치 방법 참고 [Prometheus](GCP)Install Stackdriver-exporter for monitoring GCP with helm chart Concept stackdriver-exporter를 사용하면 GCP에서 사용중인 리소스를 모니터링할 수 있다. 다만, GCP 콘솔에서와 달리 공식문서에서 제공해주는 metrics 값들이 모두 모니터링 가능한 것은 아니라 필요한 데이터 수집에 대한 테스트가 필요하다. 아래는 stackdriver-exporter helm chart의 metrics에서 사용하는 option에 대한 설명이다 수집 가능한 metrics 확인하는 방법 1. GCP doc - Metrics list 공식문서 참고 https://clou.. [Prometheus]Add custom grafana template to Prometheus-stack template location kube-prometheus-stack/templates/grafana/dashboards-1.14/ 나의 경우 alertmanager-overview.yaml 파일을 복사해서 사용했다. cp kube-prometheus-stack/templates/grafana/dashboards-1.14/alertmanager-overview.yaml kube-prometheus-stack/templates/grafana/dashboards-1.14/cloudwatch-exporter.yaml Export grafana dashboard Variables에 datasource 추가 Save JSON to file Create new template 아래는 복사해온 template에서 .. [Prometheus]Prometheus Slack Alert 연동하기 ❗Custom Rules 작성이 선행되어야 하고 이후 annotaion을 slack message에서 가져다 쓴다. 2022.07.11 - [Monitoring/Prometheus] - [Prometheus](AWS)Add Custom rules to Prometheus stack with cloudwatch-exporter Slack 수신 웹 설정 메시지를 포스트할 워크스페이스에 새 Slack 앱을 생성(link)한다. 기능 페이지에서 수신 웹후크 활성화 토글을 켭니다. Slack에서 Alert을 수신할 채널을 추가한다. 워크스페이스에 새 웹후크 추가를 클릭합니다(. (Add New Webhook to Workspace) API TEST curl -X POST -H 'Content-type: appli.. [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 .. 이전 1 2 다음 목록 더보기