docs/en/assets/resources/_prometheus.mdx
First, create a database in TDengine to store Prometheus data:
CREATE DATABASE prometheus_data;
Configuring Prometheus is done by editing the Prometheus configuration file prometheus.yml (default location /etc/prometheus/prometheus.yml).
Set the remote_read url and remote_write url to point to the domain name or IP address of the server running the taosAdapter service, the REST service port (taosAdapter defaults to 6041), and the name of the database you want to write to in TDengine, ensuring the URLs are formatted as follows:
http://<taosAdapter's host>:<REST service port>/prometheus/v1/remote_read/<database name>http://<taosAdapter's host>:<REST service port>/prometheus/v1/remote_write/<database name>remote_write:
- url: "http://localhost:6041/prometheus/v1/remote_write/prometheus_data"
basic_auth:
username: root
password: taosdata
remote_read:
- url: "http://localhost:6041/prometheus/v1/remote_read/prometheus_data"
basic_auth:
username: root
password: taosdata
remote_timeout: 10s
read_recent: true