Hide Forgot
Description of problem: cri-o needs --enable-metrics --metrics-port <port> for metric collection to be effective (e.g. for Prometheus). Version-Release number of the following components: rpm -q openshift-ansible => as of HEAD / 3cd1597a509c218713b7665dab6c57c0c4cc8c6d Additional info: # crio --help NAME: crio - crio server (...) GLOBAL OPTIONS: (...) --enable-metrics enable metrics endpoint for the server on localhost:9090 (...) --metrics-port value port for the metrics endpoint (default: 9090)
Man page PR: https://github.com/kubernetes-sigs/cri-o/pull/1777 Configuration file PR: https://github.com/kubernetes-sigs/cri-o/pull/1878
Checked and metrics is enabled by default now. $ rpm -qa |grep -i cri-o cri-o-1.12.5-6.rhaos4.0.git80d1487.el7.x86_64 $ cat /etc/sysconfig/crio-* # /etc/sysconfig/crio-metrics CRIO_METRICS_OPTIONS="--enable-metrics=true --metrics-port=9537" CRIO_NETWORK_OPTIONS="--cni-config-dir=/etc/kubernetes/cni/net.d --cni-plugin-dir=/var/lib/cni/bin" # /etc/sysconfig/crio-storage CRIO_STORAGE_OPTIONS= $ sudo fuser -v 9537/tcp USER PID ACCESS COMMAND 9537/tcp: root 4602 F.... crio $ curl -s localhost:9537/metrics | head # HELP container_runtime_crio_operations Cumulative number of CRI-O operations by operation type. # TYPE container_runtime_crio_operations counter container_runtime_crio_operations{operation_type="container_reopen_log"} 7 container_runtime_crio_operations{operation_type="container_status"} 77637 container_runtime_crio_operations{operation_type="create_container"} 189 container_runtime_crio_operations{operation_type="exec_sync"} 11775 container_runtime_crio_operations{operation_type="image_status"} 465 container_runtime_crio_operations{operation_type="list_containers"} 51255 container_runtime_crio_operations{operation_type="list_images"} 3603 container_runtime_crio_operations{operation_type="list_pod_sandbox"} 48292
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:0758