Dashboard/Monitor Access
TiDB service provides access to PingCAP native Dashboard/Grafana/Prometheus and other components
TiDB provides a proxy entrance node. Users need to configure the external network proxy service to access monitoring components on their own. When configuring the external network proxy, care should be taken not to open unnecessary ports to prevent network security incidents.
Proxy Node
The TiDB service cluster provides two Proxy nodes to proxy the Dashboard/Grafana/Prometheus service
You can select ‘PROXY’ to find the current node proxy address in the node list on the ‘Details’ page
Configure Access Proxy
You first need to create a cloud host with external network configuration under the same VPC as the TiDB cluster, and then follow the steps below to configure the proxy service
Hint: Do not open unnecessary ports, it is suggested that the firewall settings of cloud host only allow access from specific source IPs
- Install nginx service
yum install nginx
- Modify nginx.conf
vi /etc/nginx/nginx.conf
# prometheus proxy
upstream prometheus_server {
server 10.9.163.206:9090; # Use the PROXY prometheus address in Details
server 10.9.174.142:9090; # Use the PROXY prometheus address in Details
}
server {
listen 9090; # Port is self-defined, please note to open the port in the firewall settings
location / {
proxy_pass http://prometheus_server/;
}
}
# grafana proxy
upstream grafana_server {
server 10.9.163.206:3000; # Use the PROXY grafana address in Details
server 10.9.174.142:3000; # Use the PROXY grafana address in Details
}
server {
listen 3000; # Port is self-defined, please note to open the port in the firewall settings
location / {
proxy_set_header Host $http_host;
proxy_pass http://grafana_server/;
}
}
# dashboard proxy
upstream dashboard_server {
server 10.9.163.206:2379; # Use the PROXY dashboard address in Details
server 10.9.174.142:2379; # Use the PROXY dashboard address in Details
}
server {
listen 2379; # Port is self-defined, please note to open the port in the firewall settings
location / {
proxy_pass http://dashboard_server/;
}
}
- Start nginx service
systemctl start nginx
Access
According to the proxy port you configured, you can access the corresponding service in your browser
You need a root account to login and authenticate when accessing Dashboard and Grafana