A adapter/gateway for TiKV.
Supports remote write and read.
Transport security is optional and can be enabled both between Prometheus and the adapter and for communication with the TiKV cluster.
go build -o tiprometheus cmd/tiprometheus/app.go
Rename the example configuration
conf.toml and adapt the parameters to your needs.
./tiprometheus -conf conf.toml
TiPrometheus is configured through a TOML file.
conf.example.toml for an example.
- PDHost The PD cluster host to connect to. TiPrometheus does not connect directly to the TiKV cluster, but uses the PD cluster to obtain a node address.
- TimeInterval (Unknown)
Which IP address and port the adapter should listen on,
:. To listen on 0.0.0.0, only write
:followed by the port.
- AdapterEnableTLS If true, TLS will be enabled on the Prometheus connection. AdapterServerCertificate and AdapterServerKey must be specified as well.
- AdapterCACertificate The CA certificate used to validate connections from Prometheus. If not specified, all clients can connect without authentication.
- AdapterServerCertificate The server certificate to use for the listener.
- AdapterServerKey The key for AdapterServerCertificate
- TiKVEnableTLS If true, TLS will be enabled on the PD/TiKV connection. TiKVCACertificate, TiKVClientCertificate and TiKVClientKey must be specified as well.
- TiKVCACertificate The CA certificate used to validate the server certificate sent by PD/TiKV.
- TiKVClientCertificate The client certificate to use for authentication on PD/TiKV.
- TiKVClientKey The key for TiKVClientCertificate.
The configuration file can contain multiple sections to allow quick switching between development/production environments.
Set the environment variable
RunTime to the section
you would like to enable:
RunTime=dev ./tiprometheus -conf conf.toml