Dameng Database (DM8) by DEM
Installation and Configuration¶
Prerequisites¶
- Install DM8
- Install DEM
DEM, short for Dameng Enterprise Manager
, is a web-based tool provided by Dameng, written in java
, used to monitor Dameng databases.
Configure DEM¶
- Access DEM, click Monitoring - Database Monitoring, click "+", add the database instance you want to monitor;
- Click System - System Configuration, in item 7 "Other Functions", modify
prometheus_metric_mf_nodes
andprometheus_metric_db_nodes
, add host and database nodes respectively to expose Prometheus metrics, click "Save" after modification; - Request the endpoint
http://<dem-server>:8080/dem/metrics
. If Prometheus metrics are output, the configuration is successful. The metrics contain the following important labels: instance
: DEM instancedb
: Database instance namemf
: Host
DataKit Collector Configuration¶
Since DEM
can directly expose the metrics
URL, it can be collected directly using the prom
collector.
Create configuration file:
# Enter the Prometheus collector configuration directory
cd /usr/local/datakit/conf.d/prom
# Create plugin configuration file
cp promv2.conf.sample promv2_dem.conf
Modify the following fields in the configuration file promv2_dem.conf
:
- source: Collector alias displayed by Datakit;
- url: Collection endpoint;
- measurement_name: Metric set name;
Complete configuration example:
# {"version": "1.75.1", "desc": "do NOT edit this line"}
[[inputs.promv2]]
## Collector alias.
source = "prom_dem"
url = "http://192.168.195.55:8080/dem/metrics"
## (Optional) Collect interval: (defaults to "30s").
interval = "30s"
## Measurement name.
## If measurement_name is empty, split metric name by '_', the first field after split as measurement set name, the rest as current metric name.
## If measurement_name is not empty, using this as measurement set name.
measurement_name = "prom_dem"
## Keep Exist Metric Name
## If the keep_exist_metric_name is true, keep the raw value for field names.
## The bearer_token_file specifies the token file, and the Authorization header is added automatically.
# bearer_token_file = ""
## TLS config
# insecure_skip_verify = true
## Following ca_certs/cert/cert_key are optional, if insecure_skip_verify = true.
# ca_certs = ["/opt/tls/ca.crt"]
# cert = "/opt/tls/client.root.crt"
# cert_key = "/opt/tls/client.root.key"
## Set to 'true' to enable election.
election = true
## Add HTTP headers to data pulling (Example basic authentication).
# [inputs.promv2.http_headers]
# Authorization = ""
[inputs.promv2.tags]
# some_tag = "some_value"
# more_tag = "some_other_value"
Restart DataKit¶
Metrics¶
Metric Name | Description | Unit |
---|---|---|
dm_global_status_tps |
Transactions per second | count/s |
dm_global_status_qps |
Queries per second | count/s |
dm_global_status_qps_in_plsql |
Queries per second in PL/SQL | count/s |
dm_global_status_nio_ips |
Bytes received from clients per second | bytes/s |
dm_global_status_nio_ops |
Bytes sent to clients per second | bytes/s |
dm_global_status_fio_ips |
Physical read operations per second | count/s |
dm_global_status_fio_ops |
Physical write operations per second | count/s |
dm_global_status_mem_used |
Memory used | bytes |
dm_global_status_cpu_use_rate |
CPU usage of DM database in OS | percent |
dm_global_status_swap |
Total or used swap space in bytes | bytes |
dm_global_status_sessions |
Total or active sessions | count |
dm_global_status_task_waiting |
Number of waiting tasks | count |
dm_global_status_task_ready |
Number of ready tasks | count |
dm_global_status_total_wait_time |
Total wait time | seconds |
dm_global_status_avg_wait_time |
Average wait time | seconds |
dm_global_status_threads |
Threads allocated from this database | count |
dm_mf_status_cpu_use_rate |
Host CPU usage (user, system, iowait, total) | percent |
dm_mf_status_memory_mem_total_bytes |
Total memory size in bytes | bytes |
dm_mf_status_memory_mem_used_bytes |
Used memory size in bytes | bytes |
dm_mf_status_memory_swap_total_bytes |
Total swap space size in bytes | bytes |
dm_mf_status_memory_swap_used_bytes |
Used swap space size in bytes | bytes |
dm_mf_status_memory_swap_page_in |
Pages read from swap space | pages |
dm_mf_status_memory_swap_page_out |
Pages written to swap space | pages |
dm_mf_status_disk_total_bytes |
Total disk size in bytes | bytes |
dm_mf_status_disk_used_bytes |
Used disk size in bytes | bytes |
dm_mf_status_disk_write_speed_bytes |
Disk write speed in bytes per second | bytes/s |
dm_mf_status_disk_read_speed_bytes |
Disk read speed in bytes per second | bytes/s |
dm_mf_status_network_receive_speed_bytes |
Network receive speed in bytes per second | bytes/s |
dm_mf_status_network_transmit_speed_bytes |
Network transmit speed in bytes per second | bytes/s |
dm_mf_status_filesystem_total_bytes |
Total filesystem size in bytes | bytes |
dm_mf_status_filesystem_used_bytes |
Used filesystem size in bytes | bytes |