{"id":30047592,"url":"https://github.com/tmax-cloud/install-prometheus","last_synced_at":"2026-02-25T13:02:01.086Z","repository":{"id":47699909,"uuid":"315511918","full_name":"tmax-cloud/install-prometheus","owner":"tmax-cloud","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-04T08:37:15.000Z","size":651,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-19T10:10:09.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmax-cloud.png","metadata":{"files":{"readme":"README(postgre).md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-24T03:50:40.000Z","updated_at":"2021-12-08T05:01:59.000Z","dependencies_parsed_at":"2023-01-29T02:15:28.483Z","dependency_job_id":null,"html_url":"https://github.com/tmax-cloud/install-prometheus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tmax-cloud/install-prometheus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmax-cloud%2Finstall-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmax-cloud%2Finstall-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmax-cloud%2Finstall-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmax-cloud%2Finstall-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmax-cloud","download_url":"https://codeload.github.com/tmax-cloud/install-prometheus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmax-cloud%2Finstall-prometheus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269236777,"owners_count":24383241,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-08-07T09:56:34.682Z","updated_at":"2025-10-27T20:42:55.544Z","avatar_url":"https://github.com/tmax-cloud.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# postgre prometheus 연동 가이드\n\n## 구성 요소\n* postgre ([timescaledev/promscale-extension:latest-pg12](https://hub.docker.com/layers/timescaledev/promscale-extension/latest-pg12/images/sha256-77fa2ea35276a0c28fa460b45a98fbfd7250c24e70628d0a6b18737d357793a8?context=explore))\n* promscale-connector ([timescale/promscale:0.1.2](https://hub.docker.com/layers/timescale/promscale/0.1.4/images/sha256-de1c4e0d0c5e6c91be2ba18faea7a663793db3535d18a57cbe5608e4e63cd41b?context=explore))\n\n## Prerequisite\n\n\n## 구축 가이드\n* 외부 네트워크 통신이 가능한 환경에서 필요한 이미지를 다운받는다\n```\n$ sudo docker pull timescaledev/promscale-extension:latest-pg12\n$ sudo docker pull timescale/promscale:0.1.4\n```\n* 생성한 이미지 tar 파일을 폐쇄망 환경으로 이동시킨 뒤 사용하려는 registry에 push한다.\n```\n$ sudo docker load \u003c promscale-extension:latest-pg12.tar\n$ sudo docker load \u003c timescale/promscale:0.1.4.tar\n    \n$ sudo docker tag timescaledev/promscale-extension:latest-pg12 ${REGISTRY}/timescaledev/promscale-extension:latest-pg12\n$ sudo docker tag timescale/promscale:0.1.4 ${REGISTRY}/timescale/promscale:0.1.4\n  \n$ sudo docker push ${REGISTRY}/timescaledev/promscale-extension:latest-pg12\n$ sudo docker push ${REGISTRY}/timescale/promscale:0.1.4\n\t\n```\n\t\n\t\n\t\n\n## 설치 가이드\n1. [pvc 및 postgre pod 생성](#step-1-pvc-%EB%B0%8F-postgre-pod-%EC%83%9D%EC%84%B1)\n2. [pro\tmscale-connector 설치](#step-2-promscale-connector-%EC%84%A4%EC%B9%98)\n3. [prometheus 설정 변경](#step-3-prometheus-%EC%84%A4%EC%A0%95-%EB%B3%80%EA%B2%BD)\n4. [확인](#step-4-%ED%99%95%EC%9D%B8)\n\t\n***\n\n## Step 1. PVC 및 postgre pod 생성\n* 목적 : postgre가 사용할 pvc와 postgre pod 생성\n* kubectl create -f postgre-pvc.yaml 명령어를 통해 pvc와 pv 생성 [postgre-pvc.yaml](https://github.com/tmax-cloud/install-prometheus/blob/main/postgre-connection-guide/manifest/postgre-pvc.yaml)\n* postgre-password-secret.yaml 에서 $PASSWORD를 원하는 비밀번호를 BASE64로 인코딩하여 대체 [postgre-password-secret.yaml](https://github.com/tmax-cloud/install-prometheus/blob/main/postgre-connection-guide/manifest/postgre-password-secret.yaml)\n* kubectl create -f postgre-password-secret.yaml 명령어를 통해 postgre DB에서 사용할 비밀번호를 위한 secret 생성 \n* postgre-deployment.yaml 에서 원하는 db user id를 $USER_ID에 대체 [postgre-deployment.yaml](https://github.com/tmax-cloud/install-prometheus/blob/main/postgre-connection-guide/manifest/postgre-deployment.yaml)\n* kubectl create -f postgre-deployment.yaml 명령어를 통해 postgre deployment와 service 생성\n\n\n***\n\n## Step 2. promscale-connector 설치\n* 목적 : promscale-connector pod 및 service 생성, postgre와 연결\n* promscale-connector-deployment.yaml 에서 $USER_ID를 postgre에 설정한 db user id로 대체 [promscale-connector-deployment.yaml](https://github.com/tmax-cloud/install-prometheus/blob/main/postgre-connection-guide/manifest/promscale-connector-deployment.yaml)\n* kubectl create -f postgre-deployment.yaml 명령어를 통해 promscale-connector pod 와 service 생성\n\n***\n\n## Step 3. prometheus 설정 변경\n\n* 목적 : prometheus가 promscale-connector를 인지하고 metric 정보를 postgre db 에 read/write 할 수 있도록 함\n\n* prometheus-prometheus.yaml 에서 spec 아래 레벨에 다음을 추가한다.\n\t```\n  remoteWrite:\n    - url: \"http://promscale.monitoring.svc.cluster.local:9201/write\"\n  remoteRead:\n    - url: \"http://promscale.monitoring.svc.cluster.local:9201/read\"\n\t```\n\n\n***\n\n## Step 4. 확인\n* 목적: postgre, promscale-connector, prometheus의 정상 연동 확인\n* postgre pod에 접속한다.\n* psql -U $USER_ID 명령어로 postgresql 접속\n* \\c postgres로 DB 접속\n* \\dv  → prometheus에서 등록한 metric 확인\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmax-cloud%2Finstall-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmax-cloud%2Finstall-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmax-cloud%2Finstall-prometheus/lists"}