You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## download prometheus-postgresql-adapter binary file
wget https://github.com/timescale/prometheus-postgresql-adapter/releases/download/v0.6.0/prometheus-postgresql-adapter-0.6.0-linux-amd64.tar.gz
tar vxzf prometheus-postgresql-adapter-0.6.0-linux-amd64.tar.gz
install pg_prometheus
git clone https://github.com/timescale/pg_prometheus.git
cd pg_prometheus
make
make install
SELECT create_prometheus_table('metrics',use_timescaledb=>true);
install TimescaleDB
postgres=# \dx
List of installed extensions
Name | Version | Schema | Description
---------------+-----------+------------+-------------------------------------------------------------------
pg_prometheus | 0.2.1 | public | Prometheus metrics for PostgreSQL
plpgsql | 1.0 | pg_catalog | PL/pgSQL procedural language
timescaledb | 1.4.0-dev | public | Enables scalable inserts and complex queries for time-series data
(3 rows)
[root@r35 conf]# cat prometheus.yml
---
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
external_labels:
cluster: 'test-cluster'
monitor: "prometheus"
remote_write:
- url: "http://192.168.159.35:9021/write"