Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup prometheus metrics after a reload #2716

Closed
wants to merge 4 commits into from

Conversation

aledbf
Copy link
Member

@aledbf aledbf commented Jun 27, 2018

What this PR does / why we need it:

#2701 (comment)

Context:

  • we only have a list of endpoints to remove from the metrics
  • we need all the label to delete a metric

Process:

  • after a reload and before replacing the running model, create a list of endpoints not available anymore
  • request to /metrics to get current metrics
  • for each endpoint to remove, get the metric/s
  • for each metric obtained in the previous step delete prometheus metric

@aledbf aledbf added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 27, 2018
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jun 27, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aledbf

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 27, 2018
@aledbf aledbf force-pushed the cleanup-prometheus branch from a67def0 to dc2ddde Compare June 27, 2018 15:44
@aledbf aledbf force-pushed the cleanup-prometheus branch from dc2ddde to af4cfd2 Compare June 27, 2018 16:05
@aledbf aledbf added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 27, 2018
// associated with the label anymore.
func (sc *SocketCollector) RemoveMetrics(label string, values []string) {
for _, val := range values {
glog.Infof("Removing prometheus metric %v=%v", label, val)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brancz I am trying to implement the cleanup but I am not sure the information I get at this point (the IP addresses I need to remove from the metrics) is enough. Any advice?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you are actually going to have to go through all label values and combinations, not just upstream_ip.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brancz like in the example below?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically you need to pass to Delete all the labels that you passed into metric.WIthLabelValues, so yes all labels of that metric.

@aledbf
Copy link
Member Author

aledbf commented Jun 27, 2018

Scenario:

  • one ingress rule
  • one deployment with five endpoints

Current metrics:

$ kubectl exec -it -n ingress-nginx nginx-ingress-controller-677b75cbf-pnbdb curl localhost:10254/metrics
# HELP bytes_sent The the number of bytes sent to a client
# TYPE bytes_sent histogram
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1000"} 11
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10000"} 11
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100000"} 11
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+06"} 11
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+07"} 11
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 11
bytes_sent_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200"} 9669
bytes_sent_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200"} 11
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1000"} 2
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10000"} 2
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100000"} 2
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+06"} 2
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+07"} 2
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 2
bytes_sent_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200"} 1758
bytes_sent_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200"} 2
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1000"} 3
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10000"} 3
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100000"} 3
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+06"} 3
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+07"} 3
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 3
bytes_sent_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200"} 2637
bytes_sent_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200"} 3
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1000"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10000"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100000"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+06"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+07"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 1
bytes_sent_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200"} 879
bytes_sent_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 0
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1000"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10000"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100000"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+06"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1e+07"} 1
bytes_sent_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 1
bytes_sent_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200"} 879
bytes_sent_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200"} 1
# HELP collector_last_run_successful Whether the last collector run was successful (success = 1, failure = 0).
# TYPE collector_last_run_successful gauge
collector_last_run_successful{ingress_class="nginx",namespace=""} 1
# HELP collector_last_run_successful_timestamp_seconds Timestamp of the last successful collector run
# TYPE collector_last_run_successful_timestamp_seconds gauge
collector_last_run_successful_timestamp_seconds{ingress_class="nginx",namespace=""} 1.530114965e+09
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 2.8759e-05
go_gc_duration_seconds{quantile="0.25"} 0.000114585
go_gc_duration_seconds{quantile="0.5"} 0.000229191
go_gc_duration_seconds{quantile="0.75"} 0.000346682
go_gc_duration_seconds{quantile="1"} 0.002742169
go_gc_duration_seconds_sum 0.023043297
go_gc_duration_seconds_count 63
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 96
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 6.989824e+06
# HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.
# TYPE go_memstats_alloc_bytes_total counter
go_memstats_alloc_bytes_total 1.17241504e+08
# HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.
# TYPE go_memstats_buck_hash_sys_bytes gauge
go_memstats_buck_hash_sys_bytes 1.474747e+06
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 1.244884e+06
# HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.
# TYPE go_memstats_gc_sys_bytes gauge
go_memstats_gc_sys_bytes 581632
# HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.
# TYPE go_memstats_heap_alloc_bytes gauge
go_memstats_heap_alloc_bytes 6.989824e+06
# HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.
# TYPE go_memstats_heap_idle_bytes gauge
go_memstats_heap_idle_bytes 1.056768e+06
# HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.
# TYPE go_memstats_heap_inuse_bytes gauge
go_memstats_heap_inuse_bytes 8.380416e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 81972
# HELP go_memstats_heap_released_bytes_total Total number of heap bytes released to OS.
# TYPE go_memstats_heap_released_bytes_total counter
go_memstats_heap_released_bytes_total 0
# HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.
# TYPE go_memstats_heap_sys_bytes gauge
go_memstats_heap_sys_bytes 9.437184e+06
# HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.
# TYPE go_memstats_last_gc_time_seconds gauge
go_memstats_last_gc_time_seconds 1.530121767885346e+09
# HELP go_memstats_lookups_total Total number of pointer lookups.
# TYPE go_memstats_lookups_total counter
go_memstats_lookups_total 9168
# HELP go_memstats_mallocs_total Total number of mallocs.
# TYPE go_memstats_mallocs_total counter
go_memstats_mallocs_total 1.326856e+06
# HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.
# TYPE go_memstats_mcache_inuse_bytes gauge
go_memstats_mcache_inuse_bytes 3472
# HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.
# TYPE go_memstats_mcache_sys_bytes gauge
go_memstats_mcache_sys_bytes 16384
# HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.
# TYPE go_memstats_mspan_inuse_bytes gauge
go_memstats_mspan_inuse_bytes 113392
# HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.
# TYPE go_memstats_mspan_sys_bytes gauge
go_memstats_mspan_sys_bytes 131072
# HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.
# TYPE go_memstats_next_gc_bytes gauge
go_memstats_next_gc_bytes 8.34112e+06
# HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.
# TYPE go_memstats_other_sys_bytes gauge
go_memstats_other_sys_bytes 657469
# HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.
# TYPE go_memstats_stack_inuse_bytes gauge
go_memstats_stack_inuse_bytes 2.097152e+06
# HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.
# TYPE go_memstats_stack_sys_bytes gauge
go_memstats_stack_sys_bytes 2.097152e+06
# HELP go_memstats_sys_bytes Number of bytes obtained by system. Sum of all system allocations.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 1.439564e+07
# HELP ingress_controller_config_last_reload_successfull Whether the last configuration reload attemp was successful.\n		Prometheus alert example:\n		alert: IngressControllerFailedReload \n		expr: ingress_controller_config_last_reload_successfull == 0\n		for: 10m
# TYPE ingress_controller_config_last_reload_successfull gauge
ingress_controller_config_last_reload_successfull 1
# HELP ingress_controller_config_last_reload_successfull_timestamp_seconds Timestamp of the last successful configuration reload.
# TYPE ingress_controller_config_last_reload_successfull_timestamp_seconds gauge
ingress_controller_config_last_reload_successfull_timestamp_seconds 1.530114968e+09
# HELP ingress_controller_ssl_expire_time_seconds Number of seconds since 1970 to the SSL Certificate expire. An example to check if this certificate will expire in 10 days is: "ingress_controller_ssl_expire_time_seconds < (time() + (10 * 24 * 3600))"
# TYPE ingress_controller_ssl_expire_time_seconds gauge
ingress_controller_ssl_expire_time_seconds{host="echoheaders"} -6.21355968e+10
# HELP ingress_controller_success DEPRECATED: use ingress_controller_config_last_reload_successfull_timestamp_seconds or ingress_controller_config_last_reload_successfull instead.\n			 Cumulative number of Ingress controller reload operations
# TYPE ingress_controller_success counter
ingress_controller_success{count="reloads"} 7
# HELP nginx_connections current number of client connections with state {reading, writing, waiting}
# TYPE nginx_connections gauge
nginx_connections{ingress_class="nginx",namespace="",state="reading"} 0
nginx_connections{ingress_class="nginx",namespace="",state="waiting"} 0
nginx_connections{ingress_class="nginx",namespace="",state="writing"} 1
# HELP nginx_connections_total total number of connections with state {active, accepted, handled}
# TYPE nginx_connections_total counter
nginx_connections_total{ingress_class="nginx",namespace="",state="accepted"} 37
nginx_connections_total{ingress_class="nginx",namespace="",state="active"} 1
nginx_connections_total{ingress_class="nginx",namespace="",state="handled"} 37
# HELP nginx_requests_total total number of client requests
# TYPE nginx_requests_total counter
nginx_requests_total{ingress_class="nginx",namespace=""} 1443
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 31.26
# HELP process_max_fds Maximum number of open file descriptors.
# TYPE process_max_fds gauge
process_max_fds 1.048576e+06
# HELP process_open_fds Number of open file descriptors.
# TYPE process_open_fds gauge
process_open_fds 34
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 2.8454912e+07
# HELP process_start_time_seconds Start time of the process since unix epoch in seconds.
# TYPE process_start_time_seconds gauge
process_start_time_seconds 1.53011486833e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 4.2962944e+07
# HELP request_duration_seconds The request processing time in seconds
# TYPE request_duration_seconds histogram
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 11
request_duration_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0.004
request_duration_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200"} 11
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 2
request_duration_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0.001
request_duration_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200"} 2
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 3
request_duration_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0.001
request_duration_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200"} 3
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 1
request_duration_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0
request_duration_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 1
request_duration_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 1
request_duration_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0
request_duration_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200"} 1
# HELP request_length_bytes The request length (including request line, header, and request body)
# TYPE request_length_bytes histogram
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="20"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="30"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="40"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="50"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="60"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="70"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="80"} 11
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="90"} 11
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 11
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 11
request_length_bytes_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200"} 825
request_length_bytes_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200"} 11
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="20"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="30"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="40"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="50"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="60"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="70"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="80"} 2
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="90"} 2
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 2
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 2
request_length_bytes_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200"} 150
request_length_bytes_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200"} 2
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="20"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="30"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="40"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="50"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="60"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="70"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="80"} 3
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="90"} 3
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 3
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 3
request_length_bytes_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200"} 225
request_length_bytes_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200"} 3
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="20"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="30"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="40"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="50"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="60"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="70"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="80"} 1
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="90"} 1
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 1
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 1
request_length_bytes_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200"} 75
request_length_bytes_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200"} 1
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="20"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="30"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="40"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="50"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="60"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="70"} 0
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="80"} 1
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="90"} 1
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="100"} 1
request_length_bytes_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 1
request_length_bytes_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200"} 75
request_length_bytes_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200"} 1
# HELP requests The total number of client requests.
# TYPE requests counter
requests{ingress_class="nginx",namespace=""} 18
# HELP upstream_response_time_seconds The time spent on receiving the response from the upstream server
# TYPE upstream_response_time_seconds histogram
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 11
upstream_response_time_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0.004
upstream_response_time_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.3:8080",upstream_name="default-http-svc-80",upstream_status="200"} 11
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 2
upstream_response_time_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0.001
upstream_response_time_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200"} 2
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 3
upstream_response_time_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0.001
upstream_response_time_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.7:8080",upstream_name="default-http-svc-80",upstream_status="200"} 3
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 1
upstream_response_time_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0
upstream_response_time_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.8:8080",upstream_name="default-http-svc-80",upstream_status="200"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.005"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.01"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.025"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.05"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.1"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.25"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="0.5"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="1"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="2.5"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="5"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="10"} 1
upstream_response_time_seconds_bucket{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200",le="+Inf"} 1
upstream_response_time_seconds_sum{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200"} 0
upstream_response_time_seconds_count{host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.9:8080",upstream_name="default-http-svc-80",upstream_status="200"} 1

If an endpoint is removed, for instance 172.17.0.4:8080

$ kubectl exec -it -n ingress-nginx nginx-ingress-controller-677b75cbf-pnbdb curl localhost:10254/metrics|grep 'upstream_ip="172.17.0.4:8080"' | sed -n 's/.*{\(.*\)}.*/\1/p' | sed -n 's/\(.*\)\,le.*/\1/p' | uniq
host="echoheaders",ingress="http-svc",method="GET",namespace="default",path="/",protocol="HTTP/1.1",service="http-svc",status="200",upstream_ip="172.17.0.4:8080",upstream_name="default-http-svc-80",upstream_status="200"

this extracts a list of metrics with all the labels that should be removed.

@brancz please tell me I don't need to use a hack like this one to remove metrics.

@aledbf
Copy link
Member Author

aledbf commented Jun 27, 2018

@discordianfish ping. Any feedback is welcomed

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 27, 2018
@aledbf
Copy link
Member Author

aledbf commented Jun 28, 2018

testing this I get the next error:

I0627 23:54:02.614719       5 controller.go:171] Configuration changes detected, backend reload required.
I0627 23:54:02.733760       5 controller.go:181] Backend successfully reloaded.
I0627 23:54:02.734463       5 controller.go:207] removing endpoints from prometheus metrics: [172.17.0.4:8080]
I0627 23:54:02.741261       5 collector.go:291] Removing prometheus metric for endpoint 172.17.0.4:8080
I0627 23:54:02.741279       5 collector.go:293] Removing metric from histogram upstream_response_time_seconds
2018/06/27 23:54:02 Label [map[host:"echoheaders" protocol:"HTTP/1.1" service:"http-svc" upstream_ip:"172.17.0.4:8080" upstream_name:"default-http-svc-80" upstream_status:"200" ingress:"http-svc" method:"GET" namespace:"default" path:"/" status:"200"]] error label name "host" missing in label map
I0627 23:54:02.759851       5 collector.go:293] Removing metric from histogram request_duration_seconds
2018/06/27 23:54:02 Label [map[ingress:"http-svc" namespace:"default" service:"http-svc" upstream_ip:"172.17.0.4:8080" upstream_name:"default-http-svc-80" upstream_status:"200" host:"echoheaders" path:"/" protocol:"HTTP/1.1" status:"200" method:"GET"]] error label name "host" missing in label map
I0627 23:54:02.773281       5 collector.go:293] Removing metric from histogram request_length_bytes
2018/06/27 23:54:02 Label [map[method:"GET" path:"/" protocol:"HTTP/1.1" service:"http-svc" upstream_ip:"172.17.0.4:8080" upstream_name:"default-http-svc-80" upstream_status:"200" ingress:"http-svc" namespace:"default" status:"200" host:"echoheaders"]] error label name "host" missing in label map
I0627 23:54:02.787104       5 collector.go:293] Removing metric from histogram bytes_sent
2018/06/27 23:54:02 Label [map[method:"GET" protocol:"HTTP/1.1" namespace:"default" path:"/" service:"http-svc" status:"200" upstream_ip:"172.17.0.4:8080" upstream_name:"default-http-svc-80" host:"echoheaders" ingress:"http-svc" upstream_status:"200"]] error label name "host" missing in label map

added in vec.go:

	h, err := m.hashLabels(labels)
	if err != nil {
		log.Printf("Label [%v] error %v\n", labels, err)
		return false
	}

@aledbf aledbf force-pushed the cleanup-prometheus branch 4 times, most recently from e8757fc to f62edea Compare June 28, 2018 14:58
@aledbf aledbf force-pushed the cleanup-prometheus branch 2 times, most recently from 2daa67a to 66a8d58 Compare June 28, 2018 18:22
@aledbf aledbf force-pushed the cleanup-prometheus branch from bcf319c to a1c0b26 Compare June 28, 2018 18:40
@codecov-io
Copy link

Codecov Report

Merging #2716 into master will decrease coverage by 0.37%.
The diff coverage is 13.48%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2716      +/-   ##
==========================================
- Coverage   40.95%   40.57%   -0.38%     
==========================================
  Files          72       72              
  Lines        5084     5161      +77     
==========================================
+ Hits         2082     2094      +12     
- Misses       2713     2777      +64     
- Partials      289      290       +1
Impacted Files Coverage Δ
internal/ingress/controller/controller.go 2.3% <0%> (-0.1%) ⬇️
cmd/nginx/main.go 22.62% <0%> (ø) ⬆️
internal/ingress/controller/nginx.go 10.9% <0%> (-0.03%) ⬇️
internal/ingress/metric/collector/collector.go 8.01% <22.22%> (+4.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29c5d77...a1c0b26. Read the comment docs.

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jun 28, 2018
@brancz
Copy link
Member

brancz commented Jun 29, 2018

Doing a request against /metrics and then parsing with a shell script seems rather sketchy. How about we add some tracking logic to record which label combinations have been used to set metrics for a respective upstream and then iterate over of those when the upstream is removed and delete all metrics with the label combinations. I'm thinking two nested sync.Maps, the first to index upstream, and the second to build a set of label combinations to iterate over on deletion.

@aledbf
Copy link
Member Author

aledbf commented Jun 29, 2018

Doing a request against /metrics and then parsing with a shell script seems rather sketchy.

I have the same feeling about this but it's really simple and does not require storing anything in the controller.

I'm thinking two nested sync.Maps, the first to index upstream, and the second to build a set of label combinations to iterate over on deletion.

Basically store the metrics twice, just to be able to delete both metrics?
I thought of doing something similar but it would consume too much memory.

@discordianfish
Copy link
Contributor

Agreeing with @brancz, this really seems brittle.

I think the best option is to use NewConstMetric and manage the values 'manually'. Alternatively I think you can call registry.Gather() to get the current set of metrics.

@aledbf aledbf closed this Jun 29, 2018
@aledbf aledbf deleted the cleanup-prometheus branch July 12, 2018 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants