Skip to content

Commit 96c406b

Browse files
Collect more client_read and client_write metrics by default (#16423)
1 parent eeb9699 commit 96c406b

File tree

6 files changed

+46
-2
lines changed

6 files changed

+46
-2
lines changed

aerospike/changelog.d/16423.added

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Collect more `client_read` and `client_write` metrics by default

aerospike/datadog_checks/aerospike/metrics.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
'aerospike_namespace_hwm_breached': 'namespace.hwm_breached',
1111
'aerospike_namespace_memory_free_pct': 'namespace.memory_free_pct',
1212
'aerospike_namespace_stop_writes': 'namespace.stop_writes',
13-
# pmem only avalable when configured:
13+
# pmem only available when configured:
1414
# https://github.com/aerospike/aerospike-prometheus-exporter/issues/20#issuecomment-634476536
1515
'aerospike_namespace_pmem_available_pct': 'namespace.pmem_available_pct',
1616
'aerospike_namespace_unavailable_partitions': 'namespace.unavailable_partitions',
@@ -23,8 +23,15 @@
2323
'aerospike_xdr_lag': 'xdr.lag',
2424
'aerospike_namespace_client_delete_error': 'namespace.client_delete_error',
2525
'aerospike_namespace_client_read_error': 'namespace.client_read_error',
26+
'aerospike_namespace_client_read_success': 'namespace.client_read_success',
27+
'aerospike_namespace_client_read_not_found': 'namespace.client_read_not_found',
28+
'aerospike_namespace_client_read_timeout': 'namespace.client_read_timeout',
29+
'aerospike_namespace_client_read_filtered_out': 'namespace.client_read_filtered_out',
2630
'aerospike_namespace_client_udf_error': 'namespace.client_udf_error',
2731
'aerospike_namespace_client_write_error': 'namespace.client_write_error',
32+
'aerospike_namespace_client_write_success': 'namespace.client_write_success',
33+
'aerospike_namespace_client_write_timeout': 'namespace.client_write_timeout',
34+
'aerospike_namespace_client_write_filtered_out': 'namespace.client_write_filtered_out',
2835
# index_flash_alloc_pct only available in ee configured with index-type flash:
2936
# https://docs.aerospike.com/reference/metrics#index_flash_alloc_pct
3037
'aerospike_namespace_index_flash_alloc_pct': 'namespace.index_flash_alloc_pct',
@@ -33,7 +40,7 @@
3340
'aerospike_namespace_scan_basic_error': 'namespace.scan_basic_error',
3441
'aerospike_namespace_scan_ops_bg_error': 'namespace.scan_ops_bg_error',
3542
'aerospike_namespace_scan_udf_bg_error': 'namespace.scan_udf_bg_error',
36-
# storage_engine metrics avaialble per-device or per-file depending on storage configuration:
43+
# storage_engine metrics available per-device or per-file depending on storage configuration:
3744
# https://github.com/aerospike/aerospike-prometheus-exporter/blob/bf6af43d758c6f96d7d34bf2b8742d3a6df4bfc8/watcher_namespaces.go#L383-L400
3845
'aerospike_namespace_storage_engine_device_defrag_q': 'namespace.storage_engine_device_defrag_q',
3946
'aerospike_namespace_storage_engine_file_defrag_q': 'namespace.storage_engine_file_defrag_q',

aerospike/metadata.csv

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ aerospike.namespace.client_proxy_error,gauge,,,,[Legacy] The number of proxy tra
404404
aerospike.namespace.client_proxy_timeout,gauge,,,,[Legacy] The number of proxy transactions initiated by a client request that timed out.,0,aerospike,,
405405
aerospike.namespace.client_read_error,gauge,,,,[Legacy] The number of client read transaction errors.,0,aerospike,,
406406
aerospike.namespace.client_read_error.count,count,,,,[OpenMetricsV2 and Aerospike v3.9+] The number of client read transaction errors.,0,aerospike,,
407+
aerospike.namespace.client_read_success.count,count,,,,[OpenMetricsV2 and Aerospike v3.9+] The number of client read transaction success.,0,aerospike,,
408+
aerospike.namespace.client_read_not_found.count,count,,,,[OpenMetricsV2 and Aerospike v3.9+] The number of client read transaction not found.,0,aerospike,,
409+
aerospike.namespace.client_read_timeout.count,count,,,,[OpenMetricsV2 and Aerospike v3.9+] The number of client read transaction timeout.,0,aerospike,,
410+
aerospike.namespace.client_read_filtered_out.count,count,,,,[OpenMetricsV2 and Aerospike v3.9+] The number of client read transaction filtered out.,0,aerospike,,
407411
aerospike.namespace.client_read_not_found,gauge,,,,[Legacy] The number of client read transaction that resulted in not found.,0,aerospike,,
408412
aerospike.namespace.client_read_success,gauge,,,,[Legacy] The number of successful client read transactions.,0,aerospike,,
409413
aerospike.namespace.client_read_timeout,gauge,,,,[Legacy] The number of client read transaction that timed out.,0,aerospike,,
@@ -415,6 +419,9 @@ aerospike.namespace.client_udf_error.count,count,,,,[OpenMetricsV2 and Aerospike
415419
aerospike.namespace.client_udf_timeout,gauge,,,,[Legacy] The number of udf transactions initiated by the client that timed out.,0,aerospike,,
416420
aerospike.namespace.client_write_error,gauge,,,,[Legacy] The number of client write transactions that failed with an error.,0,aerospike,,
417421
aerospike.namespace.client_write_error.count,count,,,,[OpenMetricsV2 and Aerospike v3.9+] The number of client write transactions that failed with an error.,0,aerospike,,
422+
aerospike.namespace.client_write_success.count,count,,,,[OpenMetricsV2 and Aerospike v3.9+] The number of client write transactions that succeeded.,0,aerospike,,
423+
aerospike.namespace.client_write_timeout.count,count,,,,[OpenMetricsV2 and Aerospike v3.9+] The number of client write transactions that timed out.,0,aerospike,,
424+
aerospike.namespace.client_write_filtered_out.count,count,,,,[OpenMetricsV2 and Aerospike v3.9+] The number of client write transactions that were filtered out.,0,aerospike,,
418425
aerospike.namespace.client_write_success,gauge,,,,[Legacy] The number of successful client write transactions.,0,aerospike,,
419426
aerospike.namespace.client_write_timeout,gauge,,,,[Legacy] The number of client write transactions that timed out.,0,aerospike,,
420427
aerospike.namespace.evicted_objects,gauge,,,,[Legacy] The number of objects evicted from this namespace on this node since the server started. Deprecated since 3.9,0,aerospike,,

aerospike/tests/common.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,15 @@
2424
EXPECTED_PROMETHEUS_METRICS = [
2525
'aerospike.namespace.client_delete_error.count',
2626
'aerospike.namespace.client_read_error.count',
27+
'aerospike.namespace.client_read_success.count',
28+
'aerospike.namespace.client_read_not_found.count',
29+
'aerospike.namespace.client_read_timeout.count',
30+
'aerospike.namespace.client_read_filtered_out.count',
2731
'aerospike.namespace.client_udf_error.count',
2832
'aerospike.namespace.client_write_error.count',
33+
'aerospike.namespace.client_write_success.count',
34+
'aerospike.namespace.client_write_timeout.count',
35+
'aerospike.namespace.client_write_filtered_out.count',
2936
'aerospike.namespace.clock_skew_stop_writes',
3037
'aerospike.namespace.dead_partitions',
3138
'aerospike.namespace.device_available_pct',

aerospike/tests/fixtures/prometheus.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,3 +112,24 @@ aerospike_xdr_retry_no_node{cluster_name="null",dc="DC1",service="192.168.32.3:3
112112
# HELP aerospike_xdr_success success
113113
# TYPE aerospike_xdr_success counter
114114
aerospike_xdr_success{cluster_name="null",dc="DC1",service="192.168.32.3:3000"} 1
115+
# HELP aerospike_namespace_client_write_success client write success
116+
# TYPE aerospike_namespace_client_write_success counter
117+
aerospike_namespace_client_write_success{cluster_name="null",ns="DC1",service="192.168.32.3:3000",storage_engine="device"} 1.418680251e+09
118+
# HELP aerospike_namespace_client_write_timeout client write timeout
119+
# TYPE aerospike_namespace_client_write_timeout counter
120+
aerospike_namespace_client_write_timeout{cluster_name="null",ns="DC1",service="192.168.32.3:3000",storage_engine="device"} 144
121+
# HELP aerospike_namespace_client_write_filtered_out client write filtered out
122+
# TYPE aerospike_namespace_client_write_filtered_out counter
123+
aerospike_namespace_client_write_filtered_out{cluster_name="null",ns="DC1",service="192.168.32.3:3000",storage_engine="device"} 0
124+
# HELP aerospike_namespace_client_read_filtered_out client read filtered out
125+
# TYPE aerospike_namespace_client_read_filtered_out counter
126+
aerospike_namespace_client_read_filtered_out{cluster_name="null",ns="user-data",service="192.168.32.3:3000",storage_engine="device"} 0
127+
# HELP aerospike_namespace_client_read_not_found client read not found
128+
# TYPE aerospike_namespace_client_read_not_found counter
129+
aerospike_namespace_client_read_not_found{cluster_name="null",ns="user-data",service="192.168.32.3:3000",storage_engine="device"} 2
130+
# HELP aerospike_namespace_client_read_success client read success
131+
# TYPE aerospike_namespace_client_read_success counter
132+
aerospike_namespace_client_read_success{cluster_name="null",ns="user-data",service="192.168.32.3:3000",storage_engine="device"} 100
133+
# HELP aerospike_namespace_client_read_timeout client read timeout
134+
# TYPE aerospike_namespace_client_read_timeout counter
135+
aerospike_namespace_client_read_timeout{cluster_name="null",ns="user-data",service="192.168.32.3:3000",storage_engine="device"} 0

aerospike/tests/test_unit_openmetricsv2.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def get_fixture_path(filename):
2020

2121
def test_openmetricsv2_check(aggregator, dd_run_check, instance_openmetrics_v2, mock_http_response):
2222
mock_http_response(file_path=get_fixture_path('prometheus.txt'))
23+
2324
check = AerospikeCheck('aerospike', {}, [instance_openmetrics_v2])
2425
dd_run_check(check)
2526

0 commit comments

Comments
 (0)