How to Enable Monitoring? #
The host monitoring function needs to pass through Prometheus’ node_ exporter
, and the agent module of SphereEx Enterprise Data Service Platform achieves compute node monitoring.
Requirements
Before enabling the monitoring function:
- Please confirm that
node_exporter
is running on the monitoring host. a. Download the correspondingnode_ exporter
component according to the operating system, download address: https://prometheus.io/download/ . b. Unzip thenode_ exporter
installation package, and execute command./node_exporter
to start. - Please ensure that the agent function is enabled on the compute node. Refer to https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-proxy/observability/ for relevant operations.
Procedure
- Install and start Prometheus. Assume that the operation address is 192.168.1.100 and port 9090.
- Configure monitoring objectives.
Caution:
Modify the Prometheus configuration file prometheus.yml
, add the host, compute node IP and port in the static_configs.targets
under scrape_configs
node. You need to use the actual IP address of the host and compute node, not 127.0.0.1, localhost and other local addresses.
Suppose the access address of node_exporter
of the monitoring host is 192.168.1.100:9100, and the running address of the Prometheus plugin in the agent module of the compute node is 192.168.1.100:9000.
static_configs:
- targets: ["192.168.1.100:9100", "192.168.1.100:9000"]
- Configure the Prometheus address in application.properties. prometheus.server.address=http://192.168.1.100:9090