普羅米修斯公開了自己的任何指標嗎? (例如它使用的磁碟空間)

普羅米修斯公開了自己的任何指標嗎? (例如它使用的磁碟空間)

Prometheus 是否公開了自身的任何指標?即它使用了多少磁碟空間等。

我想開始微調我們的普羅米修斯伺服器,因此需要監視當前存在的內容。我希望能夠看到它使用了多少磁碟空間。

在 Ubuntu Linux 22.04 LTS 上透過 apt 安裝 Prometheus v2.31。

答案1

預設應啟用端點/metrics(找不到任何有關啟用/停用此功能的文檔,似乎始終處於啟用狀態)

Prometheus 需要配置為從自身抓取指標端點:

scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

    # Override the global default and scrape targets from this job every 5 seconds.
    scrape_interval: 5s

    static_configs:
      - targets: ['localhost:9090']

取自入門指南

我想 Prometheus 端點中關於磁碟空間使用情況的最相關指標是:prometheus_tsdb_storage_blocks_bytes

但為了進行微調和分析,您可能還需要安裝 prometheus 節點導出器。

相關內容