grafana

    Nginx SSL 설정

    개인 프로젝트 공간을 Lightsail로 옮기면서 Apache에서 Nginx로 변경했습니다. 옮기고 나니 저사양에서는 Nginx가 훨씬 좋았습니다. 설정도 간단하고, 성능도 좋아졌네요. Nginx에서 SSL 설정 방법을 설명합니다. 개인 환경 static html 페이지 몇 개가 노출 되야 합니다. node.js로 8080 포트로 서비스가 올라갑니다. grafana가 3000 포트로 올라갑니다. SSL 기본 설정 server_name에 도메인을 넣고, static html 노출을 위해 web root 경로를 지정합니다. 키 파일을 지정하고, favicon 관련 불필요한 설정 off 했습니다. server { server_name mydomain.com; listen 443 ssl; location / {..

    nats - prometheus 연동

    목적 nats -> prometheus -> grafana 구성으로 모니터링 환경을 구축 하려고 한다. 방법 nats와 prometheus 모니터링을 하기위해, nats 서버에 prometheus-nats-exporter를 설치 해야한다. nats와 nats-exporter 연동을 위해서는 nats-server 기동시 -m 옵션으로 모니터링 포트를 지정해야한다. nats-server -p 4222 -m 8222 nats-exporter를 기동한다. prometheus-nats-exporter -varz -jsz=all http://127.0.0.1:8222nats-exporter가 nats-server보다 먼저 기동되어서는 안된다. 8222 포트가 listen 된것을 확인하고, 기동해야 정상적으로 연동된..

    Grafana와 EFS 연동

    목적 Helm으로 설치한 Grafana가 Storage를 안잡았더니, pod가 생성될때마다 Datasource와 Dashboard 설정을 해줘야했다. 이를 위해 PVC 설정을 하려고 한다. 방법 grafana-pvc.yaml 생성 efs는 기존에 만들어진 efs-sc를 사용했다. kind: PersistentVolumeClaim apiVersion: v1 metadata: name: pvc-prom-grafana namespace: prometheus annotations: volume.beta.kubernetes.io/storage-class: efs-sc spec: accessModes: - ReadWriteMany resources: requests: storage: 10Gi pvc 생성 및 확인 ..

    promethues 쿼리 몇 가지

    kubernetes에 prometheus & grafana로 구성하고, grafana 에서 사용한 prometheus 쿼리 몇가지 정리 합니다. 버전 Prometheus 2.26.0 Grafana 8.3.0 쿼리 Stat namespace 개수: count(kube_namespace_created) pvc 개수: count(kube_presistentvolumeclain_info) pod 개수: count(count by(pod)(container_spec_memory_reservation_limit_bytes{pod!=""})) container 개수: count(kube_pod_container_status_running{namespace!="/"}) Replica Rate: sum(kube_repl..