diff --git a/envoy/conf.yaml.example b/envoy/conf.yaml.example index a3f4ddaf4ffcc..29d49e3db494e 100644 --- a/envoy/conf.yaml.example +++ b/envoy/conf.yaml.example @@ -9,6 +9,8 @@ instances: # supply a list of tags. The admin endpoint must be accessible. # https://www.envoyproxy.io/docs/envoy/latest/operations/admin + # Add a `?usedonly` on the end if you wish to ignore + # unused metrics instead of reporting them as `0`. - stats_url: http://localhost:80/stats # tags: diff --git a/envoy/datadog_checks/envoy/envoy.py b/envoy/datadog_checks/envoy/envoy.py index f941cc31de9c3..338be9cdcb79a 100644 --- a/envoy/datadog_checks/envoy/envoy.py +++ b/envoy/datadog_checks/envoy/envoy.py @@ -8,7 +8,7 @@ from datadog_checks.checks import AgentCheck from .errors import UnknownMetric, UnknownTags -from .parser import parse_metric +from .parser import parse_histogram, parse_metric class Envoy(AgentCheck): @@ -38,7 +38,7 @@ def check(self, instance): timeout = int(instance.get('timeout', 20)) try: - request = requests.get( + response = requests.get( stats_url, auth=auth, verify=verify_ssl, proxies=proxies, timeout=timeout ) except requests.exceptions.Timeout: @@ -52,8 +52,8 @@ def check(self, instance): self.log.exception(msg) return - if request.status_code != 200: - msg = 'Envoy endpoint `{}` responded with HTTP status code {}'.format(stats_url, request.status_code) + if response.status_code != 200: + msg = 'Envoy endpoint `{}` responded with HTTP status code {}'.format(stats_url, response.status_code) self.service_check(self.SERVICE_CHECK_NAME, AgentCheck.CRITICAL, message=msg, tags=custom_tags) self.log.warning(msg) return @@ -61,20 +61,12 @@ def check(self, instance): # Avoid repeated global lookups. get_method = getattr - for line in request.content.decode().splitlines(): + for line in response.content.decode().splitlines(): try: envoy_metric, value = line.split(': ') except ValueError: continue - try: - value = int(value) - except (ValueError, TypeError): - self.log.debug( - 'Unable to parse value `{}` as an integer for metric `{}`'.format(value, envoy_metric) - ) - continue - try: metric, tags, method = parse_metric(envoy_metric) except UnknownMetric: @@ -90,7 +82,14 @@ def check(self, instance): self.unknown_tags[tag] += 1 continue - tags.extend(custom_tags) - get_method(self, method)(metric, value, tags=tags) + try: + value = int(value) + tags.extend(custom_tags) + get_method(self, method)(metric, value, tags=tags) + + # If the value isn't an integer assume it's pre-computed histogram data. + except (ValueError, TypeError): + for metric, value in parse_histogram(metric, value): + self.gauge(metric, value, tags=tags) self.service_check(self.SERVICE_CHECK_NAME, AgentCheck.OK, tags=custom_tags) diff --git a/envoy/datadog_checks/envoy/metrics.py b/envoy/datadog_checks/envoy/metrics.py index c4d442f874990..47c27adf0522f 100644 --- a/envoy/datadog_checks/envoy/metrics.py +++ b/envoy/datadog_checks/envoy/metrics.py @@ -11,7 +11,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'server.uptime': { 'tags': ( @@ -74,28 +74,28 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'filesystem.write_completed': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'filesystem.flushed_by_timer': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'filesystem.reopen_failed': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'filesystem.write_total_buffered': { 'tags': ( @@ -109,28 +109,28 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'runtime.override_dir_not_exists': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'runtime.override_dir_exists': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'runtime.load_success': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'runtime.num_keys': { 'tags': ( @@ -145,7 +145,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster_manager.cds.update_attempt': { 'tags': ( @@ -153,7 +153,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster_manager.cds.update_success': { 'tags': ( @@ -161,7 +161,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster_manager.cds.update_failure': { 'tags': ( @@ -169,7 +169,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster_manager.cds.version': { 'tags': ( @@ -184,35 +184,35 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.no_cluster': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.rq_redirect': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.rq_direct_response': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.rq_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'vhost.vcluster.upstream_rq_1xx': { 'tags': ( @@ -220,7 +220,7 @@ ('virtual_cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'vhost.vcluster.upstream_rq_2xx': { 'tags': ( @@ -228,7 +228,7 @@ ('virtual_cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'vhost.vcluster.upstream_rq_3xx': { 'tags': ( @@ -236,7 +236,7 @@ ('virtual_cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'vhost.vcluster.upstream_rq_4xx': { 'tags': ( @@ -244,7 +244,7 @@ ('virtual_cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'vhost.vcluster.upstream_rq_5xx': { 'tags': ( @@ -252,7 +252,7 @@ ('virtual_cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'vhost.vcluster.upstream_rq_time': { 'tags': ( @@ -268,7 +268,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.ratelimit.error': { 'tags': ( @@ -276,7 +276,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.ratelimit.over_limit': { 'tags': ( @@ -284,7 +284,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.ip_tagging.hit': { 'tags': ( @@ -292,7 +292,7 @@ ('tag_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.ip_tagging.no_hit': { 'tags': ( @@ -300,7 +300,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.ip_tagging.total': { 'tags': ( @@ -308,7 +308,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.grpc.success': { 'tags': ( @@ -316,7 +316,7 @@ ('grpc_service', 'grpc_method', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.grpc.failure': { 'tags': ( @@ -324,7 +324,7 @@ ('grpc_service', 'grpc_method', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.grpc.total': { 'tags': ( @@ -332,7 +332,7 @@ ('grpc_service', 'grpc_method', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.dynamodb.operation.upstream_rq_total': { 'tags': ( @@ -341,7 +341,7 @@ ('operation_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.dynamodb.operation.upstream_rq_time': { 'tags': ( @@ -359,7 +359,7 @@ ('table_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.dynamodb.table.upstream_rq_time': { 'tags': ( @@ -376,7 +376,7 @@ (), ('table_name', 'error_type', ), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.dynamodb.error.BatchFailureUnprocessedKeys': { 'tags': ( @@ -385,7 +385,7 @@ ('table_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.buffer.rq_timeout': { 'tags': ( @@ -393,7 +393,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.rds.config_reload': { 'tags': ( @@ -401,7 +401,7 @@ ('route_config_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.rds.update_attempt': { 'tags': ( @@ -409,7 +409,7 @@ ('route_config_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.rds.update_success': { 'tags': ( @@ -417,7 +417,7 @@ ('route_config_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.rds.update_failure': { 'tags': ( @@ -425,7 +425,7 @@ ('route_config_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.rds.version': { 'tags': ( @@ -440,21 +440,21 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'tcp.downstream_cx_no_route': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'tcp.downstream_cx_tx_bytes_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'tcp.downstream_cx_tx_bytes_buffered': { 'tags': ( @@ -468,14 +468,14 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'tcp.downstream_flow_control_resumed_reading_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'auth.clientssl.update_success': { 'tags': ( @@ -483,7 +483,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'auth.clientssl.update_failure': { 'tags': ( @@ -491,7 +491,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'auth.clientssl.auth_no_ssl': { 'tags': ( @@ -499,7 +499,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'auth.clientssl.auth_ip_white_list': { 'tags': ( @@ -507,7 +507,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'auth.clientssl.auth_digest_match': { 'tags': ( @@ -515,7 +515,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'auth.clientssl.auth_digest_no_match': { 'tags': ( @@ -523,7 +523,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'auth.clientssl.total_principals': { 'tags': ( @@ -538,35 +538,35 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'ratelimit.error': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'ratelimit.over_limit': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'ratelimit.ok': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'ratelimit.cx_closed': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'ratelimit.active': { 'tags': ( @@ -587,7 +587,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'redis.downstream_cx_rx_bytes_buffered': { 'tags': ( @@ -601,14 +601,14 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'redis.downstream_cx_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'redis.downstream_cx_tx_bytes_buffered': { 'tags': ( @@ -622,14 +622,14 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'redis.downstream_cx_drain_close': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'redis.downstream_rq_active': { 'tags': ( @@ -643,7 +643,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'redis.splitter.invalid_request': { 'tags': ( @@ -651,7 +651,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'redis.splitter.unsupported_command': { 'tags': ( @@ -659,7 +659,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'redis.command.total': { 'tags': ( @@ -667,98 +667,98 @@ ('command', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.decoding_error': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.delay_injected': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_get_more': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_insert': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_kill_cursors': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_query': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_query_tailable_cursor': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_query_no_cursor_timeout': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_query_await_data': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_query_exhaust': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_query_no_max_time': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_query_scatter_get': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_query_multi_get': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_query_active': { 'tags': ( @@ -772,49 +772,49 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_reply_cursor_not_found': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_reply_query_failure': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.op_reply_valid_cursor': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.cx_destroy_local_with_active_rq': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.cx_destroy_remote_with_active_rq': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.cx_drain_close': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.cmd.total': { 'tags': ( @@ -822,7 +822,7 @@ ('cmd', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.cmd.reply_num_docs': { 'tags': ( @@ -855,7 +855,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.collection.query.scatter_get': { 'tags': ( @@ -864,7 +864,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.collection.query.multi_get': { 'tags': ( @@ -873,7 +873,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.collection.query.reply_num_docs': { 'tags': ( @@ -910,7 +910,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.collection.callsite.query.scatter_get': { 'tags': ( @@ -920,7 +920,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.collection.callsite.query.multi_get': { 'tags': ( @@ -930,7 +930,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'mongo.collection.callsite.query.reply_num_docs': { 'tags': ( @@ -967,14 +967,14 @@ ('address', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.downstream_cx_destroy': { 'tags': ( ('address', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.downstream_cx_active': { 'tags': ( @@ -996,7 +996,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.ssl.handshake': { 'tags': ( @@ -1004,7 +1004,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.ssl.session_reused': { 'tags': ( @@ -1012,7 +1012,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.ssl.no_certificate': { 'tags': ( @@ -1020,7 +1020,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.ssl.fail_no_sni_match': { 'tags': ( @@ -1028,7 +1028,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.ssl.fail_verify_no_cert': { 'tags': ( @@ -1036,7 +1036,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.ssl.fail_verify_error': { 'tags': ( @@ -1044,7 +1044,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.ssl.fail_verify_san': { 'tags': ( @@ -1052,7 +1052,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.ssl.fail_verify_cert_hash': { 'tags': ( @@ -1060,7 +1060,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.ssl.cipher': { 'tags': ( @@ -1068,42 +1068,42 @@ (), ('cipher', ), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener_manager.listener_added': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener_manager.listener_modified': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener_manager.listener_removed': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener_manager.listener_create_success': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener_manager.listener_create_failure': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener_manager.total_listeners_warming': { 'tags': ( @@ -1131,77 +1131,77 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_ssl_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_http1_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_websocket_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_http2_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_destroy': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_destroy_remote': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_destroy_local': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_destroy_active_rq': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_destroy_local_active_rq': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_destroy_remote_active_rq': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_active': { 'tags': ( @@ -1243,7 +1243,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_length_ms': { 'tags': ( @@ -1257,7 +1257,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_rx_bytes_buffered': { 'tags': ( @@ -1271,7 +1271,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_tx_bytes_buffered': { 'tags': ( @@ -1285,49 +1285,49 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_cx_idle_timeout': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_flow_control_paused_reading_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_flow_control_resumed_reading_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_http1_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_http2_total': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_active': { 'tags': ( @@ -1341,77 +1341,77 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_rx_reset': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_tx_reset': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_non_relative_path': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_too_large': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_1xx': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_2xx': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_3xx': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_4xx': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_5xx': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_ws_on_non_ws_route': { 'tags': ( ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.downstream_rq_time': { 'tags': ( @@ -1425,7 +1425,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.user_agent.downstream_cx_total': { 'tags': ( @@ -1433,7 +1433,7 @@ ('user_agent', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.user_agent.downstream_cx_destroy_remote_active_rq': { 'tags': ( @@ -1441,7 +1441,7 @@ ('user_agent', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.user_agent.downstream_rq_total': { 'tags': ( @@ -1449,7 +1449,7 @@ ('user_agent', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.http.downstream_rq_1xx': { 'tags': ( @@ -1457,7 +1457,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.http.downstream_rq_2xx': { 'tags': ( @@ -1465,7 +1465,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.http.downstream_rq_3xx': { 'tags': ( @@ -1473,7 +1473,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.http.downstream_rq_4xx': { 'tags': ( @@ -1481,7 +1481,7 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'listener.http.downstream_rq_5xx': { 'tags': ( @@ -1489,49 +1489,49 @@ ('stat_prefix', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http2.rx_reset': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http2.tx_reset': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http2.header_overflow': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http2.trailers': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http2.headers_cb_no_stream': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http2.too_many_header_frames': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.tracing.random_sampling': { 'tags': ( @@ -1539,7 +1539,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.tracing.service_forced': { 'tags': ( @@ -1547,7 +1547,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.tracing.client_enabled': { 'tags': ( @@ -1555,7 +1555,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.tracing.not_traceable': { 'tags': ( @@ -1563,7 +1563,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'http.tracing.health_check': { 'tags': ( @@ -1571,28 +1571,28 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster_manager.cluster_added': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster_manager.cluster_modified': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster_manager.cluster_removed': { 'tags': ( (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster_manager.active_clusters': { 'tags': ( @@ -1613,7 +1613,7 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_active': { 'tags': ( @@ -1627,42 +1627,42 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_http2_total': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_connect_fail': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_connect_timeout': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_connect_attempts_exceeded': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_overflow': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_connect_ms': { 'tags': ( @@ -1683,56 +1683,56 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_destroy_local': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_destroy_remote': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_destroy_with_active_rq': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_destroy_local_with_active_rq': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_destroy_remote_with_active_rq': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_close_notify': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_rx_bytes_total': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_rx_bytes_buffered': { 'tags': ( @@ -1746,7 +1746,7 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_tx_bytes_buffered': { 'tags': ( @@ -1760,28 +1760,28 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_max_requests': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_cx_none_healthy': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_total': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_active': { 'tags': ( @@ -1795,21 +1795,21 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_pending_overflow': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_pending_failure_eject': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_pending_active': { 'tags': ( @@ -1823,98 +1823,98 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_maintenance_mode': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_timeout': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_per_try_timeout': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_rx_reset': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_tx_reset': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_retry': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_retry_success': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_retry_overflow': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_flow_control_paused_reading_total': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_flow_control_resumed_reading_total': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_flow_control_backed_up_total': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_flow_control_drained_total': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.membership_change': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.membership_healthy': { 'tags': ( @@ -1935,42 +1935,42 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.config_reload': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.update_attempt': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.update_success': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.update_failure': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.update_empty': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.version': { 'tags': ( @@ -1991,7 +1991,7 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.health_check.attempt': { 'tags': ( @@ -1999,7 +1999,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.health_check.success': { 'tags': ( @@ -2007,7 +2007,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.health_check.failure': { 'tags': ( @@ -2015,7 +2015,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.health_check.passive_failure': { 'tags': ( @@ -2023,7 +2023,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.health_check.network_failure': { 'tags': ( @@ -2031,7 +2031,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.health_check.verify_cluster': { 'tags': ( @@ -2039,7 +2039,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.health_check.healthy': { 'tags': ( @@ -2055,7 +2055,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.outlier_detection.ejections_active': { 'tags': ( @@ -2071,7 +2071,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.outlier_detection.ejections_enforced_consecutive_5xx': { 'tags': ( @@ -2079,7 +2079,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.outlier_detection.ejections_detected_consecutive_5xx': { 'tags': ( @@ -2087,7 +2087,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.outlier_detection.ejections_enforced_success_rate': { 'tags': ( @@ -2095,7 +2095,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.outlier_detection.ejections_detected_success_rate': { 'tags': ( @@ -2103,7 +2103,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.outlier_detection.ejections_enforced_consecutive_gateway_failure': { 'tags': ( @@ -2111,7 +2111,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.outlier_detection.ejections_detected_consecutive_gateway_failure': { 'tags': ( @@ -2119,42 +2119,42 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_1xx': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_2xx': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_3xx': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_4xx': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_5xx': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.upstream_rq_time': { 'tags': ( @@ -2169,7 +2169,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.canary.upstream_rq_2xx': { 'tags': ( @@ -2177,7 +2177,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.canary.upstream_rq_3xx': { 'tags': ( @@ -2185,7 +2185,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.canary.upstream_rq_4xx': { 'tags': ( @@ -2193,7 +2193,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.canary.upstream_rq_5xx': { 'tags': ( @@ -2201,7 +2201,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.canary.upstream_rq_time': { 'tags': ( @@ -2217,7 +2217,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.internal.upstream_rq_2xx': { 'tags': ( @@ -2225,7 +2225,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.internal.upstream_rq_3xx': { 'tags': ( @@ -2233,7 +2233,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.internal.upstream_rq_4xx': { 'tags': ( @@ -2241,7 +2241,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.internal.upstream_rq_5xx': { 'tags': ( @@ -2249,7 +2249,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.internal.upstream_rq_time': { 'tags': ( @@ -2265,7 +2265,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.external.upstream_rq_2xx': { 'tags': ( @@ -2273,7 +2273,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.external.upstream_rq_3xx': { 'tags': ( @@ -2281,7 +2281,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.external.upstream_rq_4xx': { 'tags': ( @@ -2289,7 +2289,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.external.upstream_rq_5xx': { 'tags': ( @@ -2297,7 +2297,7 @@ (), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.external.upstream_rq_time': { 'tags': ( @@ -2313,7 +2313,7 @@ ('from_zone', 'to_zone', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.zone.upstream_rq_2xx': { 'tags': ( @@ -2321,7 +2321,7 @@ ('from_zone', 'to_zone', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.zone.upstream_rq_3xx': { 'tags': ( @@ -2329,7 +2329,7 @@ ('from_zone', 'to_zone', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.zone.upstream_rq_4xx': { 'tags': ( @@ -2337,7 +2337,7 @@ ('from_zone', 'to_zone', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.zone.upstream_rq_5xx': { 'tags': ( @@ -2345,7 +2345,7 @@ ('from_zone', 'to_zone', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.zone.upstream_rq_time': { 'tags': ( @@ -2360,63 +2360,63 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_healthy_panic': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_zone_cluster_too_small': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_zone_routing_all_directly': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_zone_routing_sampled': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_zone_routing_cross_zone': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_local_cluster_not_ok': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_zone_number_differs': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_zone_no_capacity_left': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_subsets_active': { 'tags': ( @@ -2430,28 +2430,28 @@ ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_subsets_removed': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_subsets_selected': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, 'cluster.lb_subsets_fallback': { 'tags': ( ('cluster_name', ), (), ), - 'method': 'count', + 'method': 'monotonic_count', }, } diff --git a/envoy/datadog_checks/envoy/parser.py b/envoy/datadog_checks/envoy/parser.py index 4fc68427430d6..339e13e69f50d 100644 --- a/envoy/datadog_checks/envoy/parser.py +++ b/envoy/datadog_checks/envoy/parser.py @@ -1,9 +1,26 @@ +import re +from math import isnan + from six.moves import range, zip from .errors import UnknownMetric, UnknownTags from .metrics import METRIC_PREFIX, METRIC_TREE, METRICS +HISTOGRAM = re.compile(r'([P0-9.]+)\(([^,]+)') +PERCENTILE_SUFFIX = { + 'P0': '.0percentile', + 'P25': '.25percentile', + 'P50': '.50percentile', + 'P75': '.75percentile', + 'P90': '.90percentile', + 'P95': '.95percentile', + 'P99': '.99percentile', + 'P99.9': '.99_9percentile', + 'P100': '.100percentile', +} + + def parse_metric(metric, metric_mapping=METRIC_TREE): """Takes a metric formatted by Envoy and splits it into a unique metric name. Returns the unique metric name, a list of tags, and @@ -88,3 +105,18 @@ def construct_tags(tag_builder, num_tags): # Return an iterator in the original order. return reversed(tags) + + +def parse_histogram(metric, histogram): + """Iterates over histogram data, yielding metric-value pairs.""" + for match in HISTOGRAM.finditer(histogram): + percentile, value = match.groups() + value = float(value) + + if not isnan(value): + try: + yield metric + PERCENTILE_SUFFIX[percentile], value + + # In case Envoy adds more + except KeyError: + yield '{}.{}percentile'.format(metric, percentile[1:].replace('.', '_')), value diff --git a/envoy/metadata.csv b/envoy/metadata.csv index 9105be51ec188..87f67f2608ac6 100644 --- a/envoy/metadata.csv +++ b/envoy/metadata.csv @@ -18,7 +18,6 @@ envoy.vhost.vcluster.upstream_rq_2xx,count,,response,,Aggregate HTTP 2xx respons envoy.vhost.vcluster.upstream_rq_3xx,count,,response,,Aggregate HTTP 3xx response codes,0,envoy,vhost 3xx response codes envoy.vhost.vcluster.upstream_rq_4xx,count,,response,,Aggregate HTTP 4xx response codes,-1,envoy,vhost 4xx response codes envoy.vhost.vcluster.upstream_rq_5xx,count,,response,,Aggregate HTTP 5xx response codes,-1,envoy,vhost 5xx response codes -envoy.vhost.vcluster.upstream_rq_time,gauge,,millisecond,,Request time milliseconds,-1,envoy,vhost request time ms envoy.cluster.ratelimit.ok,count,,response,,Total under limit responses from the rate limit service,1,envoy, envoy.cluster.ratelimit.error,count,,response,,Total errors contacting the rate limit service,-1,envoy, envoy.cluster.ratelimit.over_limit,count,,response,,Total over limit responses from the rate limit service,-1,envoy, @@ -29,9 +28,7 @@ envoy.cluster.grpc.success,count,,operation,,Total successful service/method cal envoy.cluster.grpc.failure,count,,operation,,Total failed service/method calls,-1,envoy, envoy.cluster.grpc.total,count,,operation,,Total service/method calls,0,envoy, envoy.http.dynamodb.operation.upstream_rq_total,count,,request,,Total number of requests with operation_name tag,0,envoy, -envoy.http.dynamodb.operation.upstream_rq_time,gauge,,millisecond,,Time spent on operation_name tag,-1,envoy, envoy.http.dynamodb.table.upstream_rq_total,count,,request,,Total number of requests on table_name tag table,0,envoy, -envoy.http.dynamodb.table.upstream_rq_time,gauge,,millisecond,,Time spent on table_name tag table,-1,envoy, envoy.http.dynamodb.error,count,,error,,Total number of specific error_type tag for a given table_name tag,-1,envoy, envoy.http.dynamodb.error.BatchFailureUnprocessedKeys,count,,error,,Total number of partial batch failures for a given table_name tag,-1,envoy, envoy.http.buffer.rq_timeout,count,,timeout,,Total requests that timed out waiting for a full request,-1,envoy, @@ -94,25 +91,15 @@ envoy.mongo.cx_destroy_local_with_active_rq,count,,connection,,Connections destr envoy.mongo.cx_destroy_remote_with_active_rq,count,,connection,,Connections destroyed remotely with an active query,-1,envoy, envoy.mongo.cx_drain_close,count,,connection,,Connections gracefully closed on reply boundaries during server drain,0,envoy, envoy.mongo.cmd.total,count,,command,,Number of commands,0,envoy, -envoy.mongo.cmd.reply_num_docs,gauge,,document,,Number of documents in reply,0,envoy, -envoy.mongo.cmd.reply_size,gauge,,byte,,Size of the reply in bytes,0,envoy, -envoy.mongo.cmd.reply_time_ms,gauge,,millisecond,,Command time in milliseconds,-1,envoy, envoy.mongo.collection.query.total,count,,query,,Number of queries,0,envoy, envoy.mongo.collection.query.scatter_get,count,,query,,Number of scatter gets,0,envoy, envoy.mongo.collection.query.multi_get,count,,query,,Number of multi gets,0,envoy, -envoy.mongo.collection.query.reply_num_docs,gauge,,document,,Number of documents in reply,0,envoy, -envoy.mongo.collection.query.reply_size,gauge,,byte,,Size of the reply in bytes,0,envoy, -envoy.mongo.collection.query.reply_time_ms,gauge,,millisecond,,Query time in milliseconds,-1,envoy, envoy.mongo.collection.callsite.query.total,count,,query,,Number of queries for the callsite tag,0,envoy, envoy.mongo.collection.callsite.query.scatter_get,count,,query,,Number of scatter gets for the callsite tag,0,envoy, envoy.mongo.collection.callsite.query.multi_get,count,,query,,Number of multi gets for the callsite tag,0,envoy, -envoy.mongo.collection.callsite.query.reply_num_docs,gauge,,document,,Number of documents in reply for the callsite tag,0,envoy, -envoy.mongo.collection.callsite.query.reply_size,gauge,,byte,,Size of the reply in bytes for the callsite tag,0,envoy, -envoy.mongo.collection.callsite.query.reply_time_ms,gauge,,millisecond,,Query time in milliseconds for the callsite tag,-1,envoy, envoy.listener.downstream_cx_total,count,,connection,,Total connections,0,envoy, envoy.listener.downstream_cx_destroy,count,,connection,,Total destroyed connections,0,envoy, envoy.listener.downstream_cx_active,gauge,,connection,,Total active connections,0,envoy, -envoy.listener.downstream_cx_length_ms,gauge,,millisecond,,Connection length milliseconds,-1,envoy, envoy.listener.ssl.connection_error,count,,error,,Total TLS connection errors not including failed certificate verifications,-1,envoy, envoy.listener.ssl.handshake,count,,success,,Total successful TLS connection handshakes,1,envoy, envoy.listener.ssl.session_reused,count,,success,,Total successful TLS session resumptions,1,envoy, @@ -148,7 +135,6 @@ envoy.http.downstream_cx_http1_active,gauge,,connection,,Total active HTTP/1.1 c envoy.http.downstream_cx_websocket_active,gauge,,connection,,Total active WebSocket connections,0,envoy, envoy.http.downstream_cx_http2_active,gauge,,connection,,Total active HTTP/2 connections,0,envoy, envoy.http.downstream_cx_protocol_error,count,,error,,Total protocol errors,-1,envoy, -envoy.http.downstream_cx_length_ms,gauge,,millisecond,,Connection length milliseconds,0,envoy, envoy.http.downstream_cx_rx_bytes_total,count,,byte,,Total bytes received,0,envoy, envoy.http.downstream_cx_rx_bytes_buffered,gauge,,byte,,Total received bytes currently buffered,0,envoy, envoy.http.downstream_cx_tx_bytes_total,count,,byte,,Total bytes sent,0,envoy, @@ -172,7 +158,6 @@ envoy.http.downstream_rq_3xx,count,,response,,Total 3xx responses,0,envoy, envoy.http.downstream_rq_4xx,count,,response,,Total 4xx responses,-1,envoy, envoy.http.downstream_rq_5xx,count,,response,,Total 5xx responses,-1,envoy, envoy.http.downstream_rq_ws_on_non_ws_route,count,,request,,Total WebSocket upgrade requests rejected by non WebSocket routes,0,envoy, -envoy.http.downstream_rq_time,gauge,,millisecond,,Request time milliseconds,-1,envoy, envoy.http.rs_too_large,count,,error,,Total response errors due to buffering an overly large body,-1,envoy, envoy.http.user_agent.downstream_cx_total,count,,connection,,Total connections,0,envoy, envoy.http.user_agent.downstream_cx_destroy_remote_active_rq,count,,connection,,Total connections destroyed remotely with active requests,-1,envoy, @@ -201,8 +186,6 @@ envoy.cluster.upstream_cx_connect_fail,count,,error,,Total connection failures,- envoy.cluster.upstream_cx_connect_timeout,count,,timeout,,Total connection timeouts,-1,envoy, envoy.cluster.upstream_cx_connect_attempts_exceeded,count,,error,,Total consecutive connection failures exceeding configured connection attempts,-1,envoy, envoy.cluster.upstream_cx_overflow,count,,occurrence,,Total times that the cluster’s connection circuit breaker overflowed,-1,envoy, -envoy.cluster.upstream_cx_connect_ms,gauge,,millisecond,,Connection establishment milliseconds,-1,envoy, -envoy.cluster.upstream_cx_length_ms,gauge,,millisecond,,Connection length milliseconds,0,envoy, envoy.cluster.upstream_cx_destroy,count,,connection,,Total destroyed connections,0,envoy, envoy.cluster.upstream_cx_destroy_local,count,,connection,,Total connections destroyed locally,0,envoy, envoy.cluster.upstream_cx_destroy_remote,count,,connection,,Total connections destroyed remotely,0,envoy, @@ -268,31 +251,26 @@ envoy.cluster.upstream_rq_2xx,count,,response,,Aggregate HTTP 2xx response codes envoy.cluster.upstream_rq_3xx,count,,response,,Aggregate HTTP 3xx response codes,0,envoy, envoy.cluster.upstream_rq_4xx,count,,response,,Aggregate HTTP 4xx response codes,-1,envoy, envoy.cluster.upstream_rq_5xx,count,,response,,Aggregate HTTP 5xx response codes,-1,envoy, -envoy.cluster.upstream_rq_time,gauge,,millisecond,,Request time milliseconds,-1,envoy, envoy.cluster.canary.upstream_rq_1xx,count,,response,,Upstream canary aggregate HTTP 1xx response codes,0,envoy, envoy.cluster.canary.upstream_rq_2xx,count,,response,,Upstream canary aggregate HTTP 2xx response codes,1,envoy, envoy.cluster.canary.upstream_rq_3xx,count,,response,,Upstream canary aggregate HTTP 3xx response codes,0,envoy, envoy.cluster.canary.upstream_rq_4xx,count,,response,,Upstream canary aggregate HTTP 4xx response codes,-1,envoy, envoy.cluster.canary.upstream_rq_5xx,count,,response,,Upstream canary aggregate HTTP 5xx response codes,-1,envoy, -envoy.cluster.canary.upstream_rq_time,gauge,,millisecond,,Upstream canary request time milliseconds,-1,envoy, envoy.cluster.internal.upstream_rq_1xx,count,,response,,Internal origin aggregate HTTP 1xx response codes,0,envoy, envoy.cluster.internal.upstream_rq_2xx,count,,response,,Internal origin aggregate HTTP 2xx response codes,1,envoy, envoy.cluster.internal.upstream_rq_3xx,count,,response,,Internal origin aggregate HTTP 3xx response codes,0,envoy, envoy.cluster.internal.upstream_rq_4xx,count,,response,,Internal origin aggregate HTTP 4xx response codes,-1,envoy, envoy.cluster.internal.upstream_rq_5xx,count,,response,,Internal origin aggregate HTTP 5xx response codes,-1,envoy, -envoy.cluster.internal.upstream_rq_time,gauge,,millisecond,,Internal origin request time milliseconds,-1,envoy, envoy.cluster.external.upstream_rq_1xx,count,,response,,External origin aggregate HTTP 1xx response codes,0,envoy, envoy.cluster.external.upstream_rq_2xx,count,,response,,External origin aggregate HTTP 2xx response codes,1,envoy, envoy.cluster.external.upstream_rq_3xx,count,,response,,External origin aggregate HTTP 3xx response codes,0,envoy, envoy.cluster.external.upstream_rq_4xx,count,,response,,External origin aggregate HTTP 4xx response codes,-1,envoy, envoy.cluster.external.upstream_rq_5xx,count,,response,,External origin aggregate HTTP 5xx response codes,-1,envoy, -envoy.cluster.external.upstream_rq_time,gauge,,millisecond,,External origin request time milliseconds,-1,envoy, envoy.cluster.zone.upstream_rq_1xx,count,,response,,Aggregate HTTP 1xx response codes,0,envoy, envoy.cluster.zone.upstream_rq_2xx,count,,response,,Aggregate HTTP 2xx response codes,1,envoy, envoy.cluster.zone.upstream_rq_3xx,count,,response,,Aggregate HTTP 3xx response codes,0,envoy, envoy.cluster.zone.upstream_rq_4xx,count,,response,,Aggregate HTTP 4xx response codes,-1,envoy, envoy.cluster.zone.upstream_rq_5xx,count,,response,,Aggregate HTTP 5xx response codes,-1,envoy, -envoy.cluster.zone.upstream_rq_time,gauge,,millisecond,,Request time milliseconds,-1,envoy, envoy.cluster.lb_healthy_panic,count,,request,,Total requests load balanced with the load balancer in panic mode,-1,envoy, envoy.cluster.lb_zone_cluster_too_small,count,,,,No zone aware routing because of small upstream cluster size,0,envoy, envoy.cluster.lb_zone_routing_all_directly,count,,,,Sending all requests directly to the same zone,0,envoy, @@ -328,3 +306,201 @@ envoy.filesystem.write_completed,count,,occurrence,,Total number of times a file envoy.filesystem.flushed_by_timer,count,,occurrence,,Total number of times internal flush buffers are written to a file due to flush timeout,0,envoy, envoy.filesystem.reopen_failed,count,,occurrence,,Total number of times a file was failed to be opened,-1,envoy, envoy.filesystem.write_total_buffered,gauge,,byte,,Current total size of internal flush buffer in bytes,0,envoy, +envoy.vhost.vcluster.upstream_rq_time.0percentile,gauge,,millisecond,,Request time milliseconds 0-percentile,-1,envoy, +envoy.vhost.vcluster.upstream_rq_time.25percentile,gauge,,millisecond,,Request time milliseconds 25-percentile,-1,envoy, +envoy.vhost.vcluster.upstream_rq_time.50percentile,gauge,,millisecond,,Request time milliseconds 50-percentile,-1,envoy, +envoy.vhost.vcluster.upstream_rq_time.75percentile,gauge,,millisecond,,Request time milliseconds 75-percentile,-1,envoy, +envoy.vhost.vcluster.upstream_rq_time.90percentile,gauge,,millisecond,,Request time milliseconds 90-percentile,-1,envoy, +envoy.vhost.vcluster.upstream_rq_time.95percentile,gauge,,millisecond,,Request time milliseconds 95-percentile,-1,envoy, +envoy.vhost.vcluster.upstream_rq_time.99percentile,gauge,,millisecond,,Request time milliseconds 99-percentile,-1,envoy, +envoy.vhost.vcluster.upstream_rq_time.99_9percentile,gauge,,millisecond,,Request time milliseconds 99.9-percentile,-1,envoy, +envoy.vhost.vcluster.upstream_rq_time.100percentile,gauge,,millisecond,,Request time milliseconds 100-percentile,-1,envoy, +envoy.http.dynamodb.operation.upstream_rq_time.0percentile,gauge,,millisecond,,Time spent on operation_name tag 0-percentile,-1,envoy, +envoy.http.dynamodb.operation.upstream_rq_time.25percentile,gauge,,millisecond,,Time spent on operation_name tag 25-percentile,-1,envoy, +envoy.http.dynamodb.operation.upstream_rq_time.50percentile,gauge,,millisecond,,Time spent on operation_name tag 50-percentile,-1,envoy, +envoy.http.dynamodb.operation.upstream_rq_time.75percentile,gauge,,millisecond,,Time spent on operation_name tag 75-percentile,-1,envoy, +envoy.http.dynamodb.operation.upstream_rq_time.90percentile,gauge,,millisecond,,Time spent on operation_name tag 90-percentile,-1,envoy, +envoy.http.dynamodb.operation.upstream_rq_time.95percentile,gauge,,millisecond,,Time spent on operation_name tag 95-percentile,-1,envoy, +envoy.http.dynamodb.operation.upstream_rq_time.99percentile,gauge,,millisecond,,Time spent on operation_name tag 99-percentile,-1,envoy, +envoy.http.dynamodb.operation.upstream_rq_time.99_9percentile,gauge,,millisecond,,Time spent on operation_name tag 99.9-percentile,-1,envoy, +envoy.http.dynamodb.operation.upstream_rq_time.100percentile,gauge,,millisecond,,Time spent on operation_name tag 100-percentile,-1,envoy, +envoy.http.dynamodb.table.upstream_rq_time.0percentile,gauge,,millisecond,,Time spent on table_name tag table 0-percentile,-1,envoy, +envoy.http.dynamodb.table.upstream_rq_time.25percentile,gauge,,millisecond,,Time spent on table_name tag table 25-percentile,-1,envoy, +envoy.http.dynamodb.table.upstream_rq_time.50percentile,gauge,,millisecond,,Time spent on table_name tag table 50-percentile,-1,envoy, +envoy.http.dynamodb.table.upstream_rq_time.75percentile,gauge,,millisecond,,Time spent on table_name tag table 75-percentile,-1,envoy, +envoy.http.dynamodb.table.upstream_rq_time.90percentile,gauge,,millisecond,,Time spent on table_name tag table 90-percentile,-1,envoy, +envoy.http.dynamodb.table.upstream_rq_time.95percentile,gauge,,millisecond,,Time spent on table_name tag table 95-percentile,-1,envoy, +envoy.http.dynamodb.table.upstream_rq_time.99percentile,gauge,,millisecond,,Time spent on table_name tag table 99-percentile,-1,envoy, +envoy.http.dynamodb.table.upstream_rq_time.99_9percentile,gauge,,millisecond,,Time spent on table_name tag table 99.9-percentile,-1,envoy, +envoy.http.dynamodb.table.upstream_rq_time.100percentile,gauge,,millisecond,,Time spent on table_name tag table 100-percentile,-1,envoy, +envoy.mongo.cmd.reply_num_docs.0percentile,gauge,,document,,Number of documents in reply 0-percentile,0,envoy, +envoy.mongo.cmd.reply_num_docs.25percentile,gauge,,document,,Number of documents in reply 25-percentile,0,envoy, +envoy.mongo.cmd.reply_num_docs.50percentile,gauge,,document,,Number of documents in reply 50-percentile,0,envoy, +envoy.mongo.cmd.reply_num_docs.75percentile,gauge,,document,,Number of documents in reply 75-percentile,0,envoy, +envoy.mongo.cmd.reply_num_docs.90percentile,gauge,,document,,Number of documents in reply 90-percentile,0,envoy, +envoy.mongo.cmd.reply_num_docs.95percentile,gauge,,document,,Number of documents in reply 95-percentile,0,envoy, +envoy.mongo.cmd.reply_num_docs.99percentile,gauge,,document,,Number of documents in reply 99-percentile,0,envoy, +envoy.mongo.cmd.reply_num_docs.99_9percentile,gauge,,document,,Number of documents in reply 99.9-percentile,0,envoy, +envoy.mongo.cmd.reply_num_docs.100percentile,gauge,,document,,Number of documents in reply 100-percentile,0,envoy, +envoy.mongo.cmd.reply_size.0percentile,gauge,,byte,,Size of the reply in bytes 0-percentile,0,envoy, +envoy.mongo.cmd.reply_size.25percentile,gauge,,byte,,Size of the reply in bytes 25-percentile,0,envoy, +envoy.mongo.cmd.reply_size.50percentile,gauge,,byte,,Size of the reply in bytes 50-percentile,0,envoy, +envoy.mongo.cmd.reply_size.75percentile,gauge,,byte,,Size of the reply in bytes 75-percentile,0,envoy, +envoy.mongo.cmd.reply_size.90percentile,gauge,,byte,,Size of the reply in bytes 90-percentile,0,envoy, +envoy.mongo.cmd.reply_size.95percentile,gauge,,byte,,Size of the reply in bytes 95-percentile,0,envoy, +envoy.mongo.cmd.reply_size.99percentile,gauge,,byte,,Size of the reply in bytes 99-percentile,0,envoy, +envoy.mongo.cmd.reply_size.99_9percentile,gauge,,byte,,Size of the reply in bytes 99.9-percentile,0,envoy, +envoy.mongo.cmd.reply_size.100percentile,gauge,,byte,,Size of the reply in bytes 100-percentile,0,envoy, +envoy.mongo.cmd.reply_time_ms.0percentile,gauge,,millisecond,,Command time in milliseconds 0-percentile,-1,envoy, +envoy.mongo.cmd.reply_time_ms.25percentile,gauge,,millisecond,,Command time in milliseconds 25-percentile,-1,envoy, +envoy.mongo.cmd.reply_time_ms.50percentile,gauge,,millisecond,,Command time in milliseconds 50-percentile,-1,envoy, +envoy.mongo.cmd.reply_time_ms.75percentile,gauge,,millisecond,,Command time in milliseconds 75-percentile,-1,envoy, +envoy.mongo.cmd.reply_time_ms.90percentile,gauge,,millisecond,,Command time in milliseconds 90-percentile,-1,envoy, +envoy.mongo.cmd.reply_time_ms.95percentile,gauge,,millisecond,,Command time in milliseconds 95-percentile,-1,envoy, +envoy.mongo.cmd.reply_time_ms.99percentile,gauge,,millisecond,,Command time in milliseconds 99-percentile,-1,envoy, +envoy.mongo.cmd.reply_time_ms.99_9percentile,gauge,,millisecond,,Command time in milliseconds 99.9-percentile,-1,envoy, +envoy.mongo.cmd.reply_time_ms.100percentile,gauge,,millisecond,,Command time in milliseconds 100-percentile,-1,envoy, +envoy.mongo.collection.query.reply_num_docs.0percentile,gauge,,document,,Number of documents in reply 0-percentile,0,envoy, +envoy.mongo.collection.query.reply_num_docs.25percentile,gauge,,document,,Number of documents in reply 25-percentile,0,envoy, +envoy.mongo.collection.query.reply_num_docs.50percentile,gauge,,document,,Number of documents in reply 50-percentile,0,envoy, +envoy.mongo.collection.query.reply_num_docs.75percentile,gauge,,document,,Number of documents in reply 75-percentile,0,envoy, +envoy.mongo.collection.query.reply_num_docs.90percentile,gauge,,document,,Number of documents in reply 90-percentile,0,envoy, +envoy.mongo.collection.query.reply_num_docs.95percentile,gauge,,document,,Number of documents in reply 95-percentile,0,envoy, +envoy.mongo.collection.query.reply_num_docs.99percentile,gauge,,document,,Number of documents in reply 99-percentile,0,envoy, +envoy.mongo.collection.query.reply_num_docs.99_9percentile,gauge,,document,,Number of documents in reply 99.9-percentile,0,envoy, +envoy.mongo.collection.query.reply_num_docs.100percentile,gauge,,document,,Number of documents in reply 100-percentile,0,envoy, +envoy.mongo.collection.query.reply_size.0percentile,gauge,,byte,,Size of the reply in bytes 0-percentile,0,envoy, +envoy.mongo.collection.query.reply_size.25percentile,gauge,,byte,,Size of the reply in bytes 25-percentile,0,envoy, +envoy.mongo.collection.query.reply_size.50percentile,gauge,,byte,,Size of the reply in bytes 50-percentile,0,envoy, +envoy.mongo.collection.query.reply_size.75percentile,gauge,,byte,,Size of the reply in bytes 75-percentile,0,envoy, +envoy.mongo.collection.query.reply_size.90percentile,gauge,,byte,,Size of the reply in bytes 90-percentile,0,envoy, +envoy.mongo.collection.query.reply_size.95percentile,gauge,,byte,,Size of the reply in bytes 95-percentile,0,envoy, +envoy.mongo.collection.query.reply_size.99percentile,gauge,,byte,,Size of the reply in bytes 99-percentile,0,envoy, +envoy.mongo.collection.query.reply_size.99_9percentile,gauge,,byte,,Size of the reply in bytes 99.9-percentile,0,envoy, +envoy.mongo.collection.query.reply_size.100percentile,gauge,,byte,,Size of the reply in bytes 100-percentile,0,envoy, +envoy.mongo.collection.query.reply_time_ms.0percentile,gauge,,millisecond,,Query time in milliseconds 0-percentile,-1,envoy, +envoy.mongo.collection.query.reply_time_ms.25percentile,gauge,,millisecond,,Query time in milliseconds 25-percentile,-1,envoy, +envoy.mongo.collection.query.reply_time_ms.50percentile,gauge,,millisecond,,Query time in milliseconds 50-percentile,-1,envoy, +envoy.mongo.collection.query.reply_time_ms.75percentile,gauge,,millisecond,,Query time in milliseconds 75-percentile,-1,envoy, +envoy.mongo.collection.query.reply_time_ms.90percentile,gauge,,millisecond,,Query time in milliseconds 90-percentile,-1,envoy, +envoy.mongo.collection.query.reply_time_ms.95percentile,gauge,,millisecond,,Query time in milliseconds 95-percentile,-1,envoy, +envoy.mongo.collection.query.reply_time_ms.99percentile,gauge,,millisecond,,Query time in milliseconds 99-percentile,-1,envoy, +envoy.mongo.collection.query.reply_time_ms.99_9percentile,gauge,,millisecond,,Query time in milliseconds 99.9-percentile,-1,envoy, +envoy.mongo.collection.query.reply_time_ms.100percentile,gauge,,millisecond,,Query time in milliseconds 100-percentile,-1,envoy, +envoy.mongo.collection.callsite.query.reply_num_docs.0percentile,gauge,,document,,Number of documents in reply for the callsite tag 0-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_num_docs.25percentile,gauge,,document,,Number of documents in reply for the callsite tag 25-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_num_docs.50percentile,gauge,,document,,Number of documents in reply for the callsite tag 50-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_num_docs.75percentile,gauge,,document,,Number of documents in reply for the callsite tag 75-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_num_docs.90percentile,gauge,,document,,Number of documents in reply for the callsite tag 90-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_num_docs.95percentile,gauge,,document,,Number of documents in reply for the callsite tag 95-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_num_docs.99percentile,gauge,,document,,Number of documents in reply for the callsite tag 99-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_num_docs.99_9percentile,gauge,,document,,Number of documents in reply for the callsite tag 99.9-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_num_docs.100percentile,gauge,,document,,Number of documents in reply for the callsite tag 100-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_size.0percentile,gauge,,byte,,Size of the reply in bytes for the callsite tag 0-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_size.25percentile,gauge,,byte,,Size of the reply in bytes for the callsite tag 25-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_size.50percentile,gauge,,byte,,Size of the reply in bytes for the callsite tag 50-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_size.75percentile,gauge,,byte,,Size of the reply in bytes for the callsite tag 75-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_size.90percentile,gauge,,byte,,Size of the reply in bytes for the callsite tag 90-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_size.95percentile,gauge,,byte,,Size of the reply in bytes for the callsite tag 95-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_size.99percentile,gauge,,byte,,Size of the reply in bytes for the callsite tag 99-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_size.99_9percentile,gauge,,byte,,Size of the reply in bytes for the callsite tag 99.9-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_size.100percentile,gauge,,byte,,Size of the reply in bytes for the callsite tag 100-percentile,0,envoy, +envoy.mongo.collection.callsite.query.reply_time_ms.0percentile,gauge,,millisecond,,Query time in milliseconds for the callsite tag 0-percentile,-1,envoy, +envoy.mongo.collection.callsite.query.reply_time_ms.25percentile,gauge,,millisecond,,Query time in milliseconds for the callsite tag 25-percentile,-1,envoy, +envoy.mongo.collection.callsite.query.reply_time_ms.50percentile,gauge,,millisecond,,Query time in milliseconds for the callsite tag 50-percentile,-1,envoy, +envoy.mongo.collection.callsite.query.reply_time_ms.75percentile,gauge,,millisecond,,Query time in milliseconds for the callsite tag 75-percentile,-1,envoy, +envoy.mongo.collection.callsite.query.reply_time_ms.90percentile,gauge,,millisecond,,Query time in milliseconds for the callsite tag 90-percentile,-1,envoy, +envoy.mongo.collection.callsite.query.reply_time_ms.95percentile,gauge,,millisecond,,Query time in milliseconds for the callsite tag 95-percentile,-1,envoy, +envoy.mongo.collection.callsite.query.reply_time_ms.99percentile,gauge,,millisecond,,Query time in milliseconds for the callsite tag 99-percentile,-1,envoy, +envoy.mongo.collection.callsite.query.reply_time_ms.99_9percentile,gauge,,millisecond,,Query time in milliseconds for the callsite tag 99.9-percentile,-1,envoy, +envoy.mongo.collection.callsite.query.reply_time_ms.100percentile,gauge,,millisecond,,Query time in milliseconds for the callsite tag 100-percentile,-1,envoy, +envoy.listener.downstream_cx_length_ms.0percentile,gauge,,millisecond,,Connection length in milliseconds 0-percentile,-1,envoy, +envoy.listener.downstream_cx_length_ms.25percentile,gauge,,millisecond,,Connection length in milliseconds 25-percentile,-1,envoy, +envoy.listener.downstream_cx_length_ms.50percentile,gauge,,millisecond,,Connection length in milliseconds 50-percentile,-1,envoy, +envoy.listener.downstream_cx_length_ms.75percentile,gauge,,millisecond,,Connection length in milliseconds 75-percentile,-1,envoy, +envoy.listener.downstream_cx_length_ms.90percentile,gauge,,millisecond,,Connection length in milliseconds 90-percentile,-1,envoy, +envoy.listener.downstream_cx_length_ms.95percentile,gauge,,millisecond,,Connection length in milliseconds 95-percentile,-1,envoy, +envoy.listener.downstream_cx_length_ms.99percentile,gauge,,millisecond,,Connection length in milliseconds 99-percentile,-1,envoy, +envoy.listener.downstream_cx_length_ms.99_9percentile,gauge,,millisecond,,Connection length in milliseconds 99.9-percentile,-1,envoy, +envoy.listener.downstream_cx_length_ms.100percentile,gauge,,millisecond,,Connection length in milliseconds 100-percentile,-1,envoy, +envoy.http.downstream_cx_length_ms.0percentile,gauge,,millisecond,,Connection length in milliseconds 0-percentile,-1,envoy, +envoy.http.downstream_cx_length_ms.25percentile,gauge,,millisecond,,Connection length in milliseconds 25-percentile,-1,envoy, +envoy.http.downstream_cx_length_ms.50percentile,gauge,,millisecond,,Connection length in milliseconds 50-percentile,-1,envoy, +envoy.http.downstream_cx_length_ms.75percentile,gauge,,millisecond,,Connection length in milliseconds 75-percentile,-1,envoy, +envoy.http.downstream_cx_length_ms.90percentile,gauge,,millisecond,,Connection length in milliseconds 90-percentile,-1,envoy, +envoy.http.downstream_cx_length_ms.95percentile,gauge,,millisecond,,Connection length in milliseconds 95-percentile,-1,envoy, +envoy.http.downstream_cx_length_ms.99percentile,gauge,,millisecond,,Connection length in milliseconds 99-percentile,-1,envoy, +envoy.http.downstream_cx_length_ms.99_9percentile,gauge,,millisecond,,Connection length in milliseconds 99.9-percentile,-1,envoy, +envoy.http.downstream_cx_length_ms.100percentile,gauge,,millisecond,,Connection length in milliseconds 100-percentile,-1,envoy, +envoy.http.downstream_rq_time.0percentile,gauge,,millisecond,,Request time in milliseconds 0-percentile,-1,envoy, +envoy.http.downstream_rq_time.25percentile,gauge,,millisecond,,Request time in milliseconds 25-percentile,-1,envoy, +envoy.http.downstream_rq_time.50percentile,gauge,,millisecond,,Request time in milliseconds 50-percentile,-1,envoy, +envoy.http.downstream_rq_time.75percentile,gauge,,millisecond,,Request time in milliseconds 75-percentile,-1,envoy, +envoy.http.downstream_rq_time.90percentile,gauge,,millisecond,,Request time in milliseconds 90-percentile,-1,envoy, +envoy.http.downstream_rq_time.95percentile,gauge,,millisecond,,Request time in milliseconds 95-percentile,-1,envoy, +envoy.http.downstream_rq_time.99percentile,gauge,,millisecond,,Request time in milliseconds 99-percentile,-1,envoy, +envoy.http.downstream_rq_time.99_9percentile,gauge,,millisecond,,Request time in milliseconds 99.9-percentile,-1,envoy, +envoy.http.downstream_rq_time.100percentile,gauge,,millisecond,,Request time in milliseconds 100-percentile,-1,envoy, +envoy.cluster.upstream_cx_connect_ms.0percentile,gauge,,millisecond,,Connection establishment in milliseconds 0-percentile,-1,envoy, +envoy.cluster.upstream_cx_connect_ms.25percentile,gauge,,millisecond,,Connection establishment in milliseconds 25-percentile,-1,envoy, +envoy.cluster.upstream_cx_connect_ms.50percentile,gauge,,millisecond,,Connection establishment in milliseconds 50-percentile,-1,envoy, +envoy.cluster.upstream_cx_connect_ms.75percentile,gauge,,millisecond,,Connection establishment in milliseconds 75-percentile,-1,envoy, +envoy.cluster.upstream_cx_connect_ms.90percentile,gauge,,millisecond,,Connection establishment in milliseconds 90-percentile,-1,envoy, +envoy.cluster.upstream_cx_connect_ms.95percentile,gauge,,millisecond,,Connection establishment in milliseconds 95-percentile,-1,envoy, +envoy.cluster.upstream_cx_connect_ms.99percentile,gauge,,millisecond,,Connection establishment in milliseconds 99-percentile,-1,envoy, +envoy.cluster.upstream_cx_connect_ms.99_9percentile,gauge,,millisecond,,Connection establishment in milliseconds 99.9-percentile,-1,envoy, +envoy.cluster.upstream_cx_connect_ms.100percentile,gauge,,millisecond,,Connection establishment in milliseconds 100-percentile,-1,envoy, +envoy.cluster.upstream_cx_length_ms.0percentile,gauge,,millisecond,,Connection length in milliseconds 0-percentile,0,envoy, +envoy.cluster.upstream_cx_length_ms.25percentile,gauge,,millisecond,,Connection length in milliseconds 25-percentile,0,envoy, +envoy.cluster.upstream_cx_length_ms.50percentile,gauge,,millisecond,,Connection length in milliseconds 50-percentile,0,envoy, +envoy.cluster.upstream_cx_length_ms.75percentile,gauge,,millisecond,,Connection length in milliseconds 75-percentile,0,envoy, +envoy.cluster.upstream_cx_length_ms.90percentile,gauge,,millisecond,,Connection length in milliseconds 90-percentile,0,envoy, +envoy.cluster.upstream_cx_length_ms.95percentile,gauge,,millisecond,,Connection length in milliseconds 95-percentile,0,envoy, +envoy.cluster.upstream_cx_length_ms.99percentile,gauge,,millisecond,,Connection length in milliseconds 99-percentile,0,envoy, +envoy.cluster.upstream_cx_length_ms.99_9percentile,gauge,,millisecond,,Connection length in milliseconds 99.9-percentile,0,envoy, +envoy.cluster.upstream_cx_length_ms.100percentile,gauge,,millisecond,,Connection length in milliseconds 100-percentile,0,envoy, +envoy.cluster.upstream_rq_time.0percentile,gauge,,millisecond,,Request time in milliseconds 0-percentile,-1,envoy, +envoy.cluster.upstream_rq_time.25percentile,gauge,,millisecond,,Request time in milliseconds 25-percentile,-1,envoy, +envoy.cluster.upstream_rq_time.50percentile,gauge,,millisecond,,Request time in milliseconds 50-percentile,-1,envoy, +envoy.cluster.upstream_rq_time.75percentile,gauge,,millisecond,,Request time in milliseconds 75-percentile,-1,envoy, +envoy.cluster.upstream_rq_time.90percentile,gauge,,millisecond,,Request time in milliseconds 90-percentile,-1,envoy, +envoy.cluster.upstream_rq_time.95percentile,gauge,,millisecond,,Request time in milliseconds 95-percentile,-1,envoy, +envoy.cluster.upstream_rq_time.99percentile,gauge,,millisecond,,Request time in milliseconds 99-percentile,-1,envoy, +envoy.cluster.upstream_rq_time.99_9percentile,gauge,,millisecond,,Request time in milliseconds 99.9-percentile,-1,envoy, +envoy.cluster.upstream_rq_time.100percentile,gauge,,millisecond,,Request time in milliseconds 100-percentile,-1,envoy, +envoy.cluster.canary.upstream_rq_time.0percentile,gauge,,millisecond,,Upstream canary request time in milliseconds 0-percentile,-1,envoy, +envoy.cluster.canary.upstream_rq_time.25percentile,gauge,,millisecond,,Upstream canary request time in milliseconds 25-percentile,-1,envoy, +envoy.cluster.canary.upstream_rq_time.50percentile,gauge,,millisecond,,Upstream canary request time in milliseconds 50-percentile,-1,envoy, +envoy.cluster.canary.upstream_rq_time.75percentile,gauge,,millisecond,,Upstream canary request time in milliseconds 75-percentile,-1,envoy, +envoy.cluster.canary.upstream_rq_time.90percentile,gauge,,millisecond,,Upstream canary request time in milliseconds 90-percentile,-1,envoy, +envoy.cluster.canary.upstream_rq_time.95percentile,gauge,,millisecond,,Upstream canary request time in milliseconds 95-percentile,-1,envoy, +envoy.cluster.canary.upstream_rq_time.99percentile,gauge,,millisecond,,Upstream canary request time in milliseconds 99-percentile,-1,envoy, +envoy.cluster.canary.upstream_rq_time.99_9percentile,gauge,,millisecond,,Upstream canary request time in milliseconds 99.9-percentile,-1,envoy, +envoy.cluster.canary.upstream_rq_time.100percentile,gauge,,millisecond,,Upstream canary request time in milliseconds 100-percentile,-1,envoy, +envoy.cluster.internal.upstream_rq_time.0percentile,gauge,,millisecond,,Internal origin request time in milliseconds 0-percentile,-1,envoy, +envoy.cluster.internal.upstream_rq_time.25percentile,gauge,,millisecond,,Internal origin request time in milliseconds 25-percentile,-1,envoy, +envoy.cluster.internal.upstream_rq_time.50percentile,gauge,,millisecond,,Internal origin request time in milliseconds 50-percentile,-1,envoy, +envoy.cluster.internal.upstream_rq_time.75percentile,gauge,,millisecond,,Internal origin request time in milliseconds 75-percentile,-1,envoy, +envoy.cluster.internal.upstream_rq_time.90percentile,gauge,,millisecond,,Internal origin request time in milliseconds 90-percentile,-1,envoy, +envoy.cluster.internal.upstream_rq_time.95percentile,gauge,,millisecond,,Internal origin request time in milliseconds 95-percentile,-1,envoy, +envoy.cluster.internal.upstream_rq_time.99percentile,gauge,,millisecond,,Internal origin request time in milliseconds 99-percentile,-1,envoy, +envoy.cluster.internal.upstream_rq_time.99_9percentile,gauge,,millisecond,,Internal origin request time in milliseconds 99.9-percentile,-1,envoy, +envoy.cluster.internal.upstream_rq_time.100percentile,gauge,,millisecond,,Internal origin request time in milliseconds 100-percentile,-1,envoy, +envoy.cluster.external.upstream_rq_time.0percentile,gauge,,millisecond,,External origin request time in milliseconds 0-percentile,-1,envoy, +envoy.cluster.external.upstream_rq_time.25percentile,gauge,,millisecond,,External origin request time in milliseconds 25-percentile,-1,envoy, +envoy.cluster.external.upstream_rq_time.50percentile,gauge,,millisecond,,External origin request time in milliseconds 50-percentile,-1,envoy, +envoy.cluster.external.upstream_rq_time.75percentile,gauge,,millisecond,,External origin request time in milliseconds 75-percentile,-1,envoy, +envoy.cluster.external.upstream_rq_time.90percentile,gauge,,millisecond,,External origin request time in milliseconds 90-percentile,-1,envoy, +envoy.cluster.external.upstream_rq_time.95percentile,gauge,,millisecond,,External origin request time in milliseconds 95-percentile,-1,envoy, +envoy.cluster.external.upstream_rq_time.99percentile,gauge,,millisecond,,External origin request time in milliseconds 99-percentile,-1,envoy, +envoy.cluster.external.upstream_rq_time.99_9percentile,gauge,,millisecond,,External origin request time in milliseconds 99.9-percentile,-1,envoy, +envoy.cluster.external.upstream_rq_time.100percentile,gauge,,millisecond,,External origin request time in milliseconds 100-percentile,-1,envoy, +envoy.cluster.zone.upstream_rq_time.0percentile,gauge,,millisecond,,Zone request time in milliseconds 0-percentile,-1,envoy, +envoy.cluster.zone.upstream_rq_time.25percentile,gauge,,millisecond,,Zone request time in milliseconds 25-percentile,-1,envoy, +envoy.cluster.zone.upstream_rq_time.50percentile,gauge,,millisecond,,Zone request time in milliseconds 50-percentile,-1,envoy, +envoy.cluster.zone.upstream_rq_time.75percentile,gauge,,millisecond,,Zone request time in milliseconds 75-percentile,-1,envoy, +envoy.cluster.zone.upstream_rq_time.90percentile,gauge,,millisecond,,Zone request time in milliseconds 90-percentile,-1,envoy, +envoy.cluster.zone.upstream_rq_time.95percentile,gauge,,millisecond,,Zone request time in milliseconds 95-percentile,-1,envoy, +envoy.cluster.zone.upstream_rq_time.99percentile,gauge,,millisecond,,Zone request time in milliseconds 99-percentile,-1,envoy, +envoy.cluster.zone.upstream_rq_time.99_9percentile,gauge,,millisecond,,Zone request time in milliseconds 99.9-percentile,-1,envoy, +envoy.cluster.zone.upstream_rq_time.100percentile,gauge,,millisecond,,Zone request time in milliseconds 100-percentile,-1,envoy, diff --git a/envoy/tests/test_parser.py b/envoy/tests/test_parser.py index 07fba9e69e439..8de0dba3ef6f3 100644 --- a/envoy/tests/test_parser.py +++ b/envoy/tests/test_parser.py @@ -2,7 +2,7 @@ from datadog_checks.envoy.errors import UnknownMetric, UnknownTags from datadog_checks.envoy.metrics import METRIC_PREFIX, METRICS -from datadog_checks.envoy.parser import parse_metric +from datadog_checks.envoy.parser import parse_histogram, parse_metric class TestParseMetric: @@ -483,3 +483,48 @@ def test_tag_with_dots(self): ['{}:{}'.format(tags[0], tag0)], METRICS[untagged_metric]['method'] ) + + +class TestParseHistogram: + def test_no_match(self): + metric = 'envoy.http.downstream_rq_time' + value = 'No recorded values' + + assert list(parse_histogram(metric, value)) == [] + + def test_ignore_nan(self): + metric = 'envoy.http.downstream_rq_time' + value = 'P0(0,0) P25(nan,0)' + + assert list(parse_histogram(metric, value)) == [ + ('envoy.http.downstream_rq_time.0percentile', 0.0), + ] + + def test_correct(self): + metric = 'envoy.http.downstream_rq_time' + value = ( + 'P0(0,0) P25(25,0) P50(50,0) P75(75,0) P90(90,1.06) P95(95,1.08) ' + 'P99(99,1.096) P99.9(99.9,1.0996) P100(100,1.1)' + ) + + assert list(parse_histogram(metric, value)) == [ + ('envoy.http.downstream_rq_time.0percentile', 0.0), + ('envoy.http.downstream_rq_time.25percentile', 25.0), + ('envoy.http.downstream_rq_time.50percentile', 50.0), + ('envoy.http.downstream_rq_time.75percentile', 75.0), + ('envoy.http.downstream_rq_time.90percentile', 90.0), + ('envoy.http.downstream_rq_time.95percentile', 95.0), + ('envoy.http.downstream_rq_time.99percentile', 99.0), + ('envoy.http.downstream_rq_time.99_9percentile', 99.9), + ('envoy.http.downstream_rq_time.100percentile', 100.0), + ] + + def test_correct_unknown_percentile(self): + metric = 'envoy.http.downstream_rq_time' + value = 'P0(0,0) P25(25,0) P55.5(55.5,0)' + + assert list(parse_histogram(metric, value)) == [ + ('envoy.http.downstream_rq_time.0percentile', 0.0), + ('envoy.http.downstream_rq_time.25percentile', 25.0), + ('envoy.http.downstream_rq_time.55_5percentile', 55.5), + ]