[英]Is there a way to get the Kubernetes version using Prometheus API?
[英]Creating an API to connect between ArangoDB and Prometheus to get the metrics of the data inside ArangoDB and expose it in Prometheus
我正在嘗試創建一個 API 來連接 ArangoDB 和 Prometheus。 我對 ArangoDB 中的數據進行了統計,例如,我想在 Prometheus 中看到多少次啟動模擬。 因此,如果我理解的正確,我想確認以下問題:
metric_name [ "{" label_name "=" `"` label_value `"` { "," label_name "=" `"` label_value `"` } [ "," ] "}" ] value [ timestamp ]
這個對嗎? 你能確認我的理解嗎?
最后,如果你能向我推薦一個已經有人做過這種 API 來連接 ArangoDB 和 Prometheus 的來源,那就太好了。 這真的會幫助我開始這個項目。 非常感謝你。
您可能只需要找到一個允許您繪制數據的系統。 Prometheus 有一項名為Grafana的兄弟技術。
Prometheus 是一種工具,被配置為定期從系統的端點(==目標)刮取(讀取)測量值。 這些測量描述了系統在刮擦時的 state。 Prometheus 將這些測量記錄在時間序列數據庫中,並提供一種富有表現力的查詢語言,可以在數據中找到洞察力。 Prometheus 也包括此時間序列數據的基本圖表。 Prometheus 經常與 Grafana 結合使用。
您的問題表明您不是要監視數據庫的 state,而是要繪制數據庫表中包含的(統計)數據。 如果是這樣,Prometheus 可能不是您所需要的。
為了回答您的問題,Prometheus 要求系統以一種稱為 Exposition Format 的簡單文本格式發布指標集。 任何以這種格式生成數據並可以在 HTTP 端點上提供指標的系統都可以被 Prometheus 抓取。
Node Exporter 就是這種系統的一個例子,它發布了可以被 Prometheus 抓取的指標。 它發布節點(==主機)指標。
ArangoDB 是另一個可以以 Prometheus 的 Exposition 格式發布指標(關於它的 state;數據庫系統的 state)的系統,參見:
https://www.arangodb.com/2020/03/monitoring-arangodb-prometheus-grafana/
我懷疑,您需要一個解決方案來繪制您已經存儲在 ArangoDB 表中的一組數據。 為此,您可以將 Grafana 之類的系統連接到您的數據庫,然后使用 SQL 查詢以可以圖形化的形式顯示數據。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.