digitalocean / do-agent

Collects system metrics from DigitalOcean Droplets
Apache License 2.0
597 stars 99 forks source link

DBAAS: Include Additional Metrics OpenSearch + MySQL #311

Closed dwilsondo closed 5 months ago

dwilsondo commented 6 months ago

Adds metrics for DBAAS services (OS, MySQL), see full list of metrics in whitelist.go. Broadly includes:

The OS metrics use multiple exporters for different subsystems. To handle this we drop redundant node and cluster identifiers from each section as needed (see aggregation.go). Tested locally w. sample OpenSearch metrics served via an HTTP server on 127.0.0.1:9273. As expected, OS metrics are available and redundant identifiers e.g. node_host (duplicates node_name) and cluster_name (prefer dbaas_uuid in practice) are dropped.

go run . --stdout-only --dbaas-metrics-path http://127.0.0.1:9273/os.txt

[opensearch_indices_search_query_time_in_millis]: map[__name__:opensearch_indices_search_query_time_in_millis cloud:custom-digitalocean-do-nyc3 host:os-test-2 node_attribute_shard_indexing_pressure_enabled:true node_id:3NI_MJsoQiOEN-kOc4S-zQ node_name:os-test-2 node_roles:data,ingest,master,remote_cluster_client service:os-test service_type:opensearch]: 5857
...