algorand / algorand/go-algorand

Expose additional resource utilization metrics on /metrics endpoint

未关闭
#5,097 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
community interest Team Hyper Flow
主要语言
Go
星标
1.4k
派生
537
平均合并
1 天 6 小时
30 天内合并 PR
17

描述

## Overview

As a node-runner, I would like to have additional resource utilization metrics exposed on the /metrics endpoint, so that I am able to better track the resource utilization that Algod uses and establish alerts on them

## Details

- Metrics to expose:
- `process_open_fds` (to track open file descriptors)
- `process_max_fds` (to track the max file descriptors available)
- `process_cpu_seconds_total` (to track total user and system CPU time spent in seconds, type: counter)
- `process_resident_memory_bytes` (to track resident memory size in bytes, type: gauge)

## Example Cases:
- [Alerting on approaching open file limits](https://www.robustperception.io/alerting-on-approaching-open-file-limits/)
#3185

## Potential Approach
- Add `func newProcessCollector` to our own algod implementation such that the /metrics endpoint can report algod's own process metrics
- https://pkg.go.dev/github.com/prometheus/client_golang/prometheus/collectors#NewProcessCollector

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。