Prometheus之AWS EC2自動發現

2022-07-11 15:06:10 字數 749 閱讀 6520

ec2 sd配置允許從aws ec2例項中檢索目標。預設情況下用內網ip位址, 但是在relabeling期間可以改變成公網id位址。

下面meta標籤在relabeling期間在目標上是可用的:

對於ec2 discovery,看看下面的配置選項:

# 訪問ec2 api的資訊

# aws域

region:

# aws api keys. 如果空白,環境變數`aws_access_key_id`和`aws_secret_access_key`可以被使用[ access_key:

][ secret_key:

]# named aws profile used to connect to the api.

[ profile:

]# refresh interval to re-read the instance list.

[ refresh_interval:

| default =60s ]

# the port to scrape metrics

from. if using the public ip address, this

must

# instead be specified

inthe relabeling rule.

[ port:

| default = 80 ]

Prometheus之配置詳解

prometheus的配置檔案prometheus.yml,它主要分以下幾個配置塊 全域性配置 global 告警配置 alerting 規則檔案配置 rule files 拉取配置 scrape configs 遠端讀寫配置 remote read remote write 全域性配置 globa...

Prometheus之grafana視覺化

1.將游標移動到側面選單上的齒輪圖示,該圖示將顯示配置選項。2.單擊 資料來源 資料來源頁面開啟,顯示先前為 grafana 例項配置的資料來源列表。3.單擊 新增資料來源 以檢視所有支援的資料來源的列表。4.通過在搜尋對話方塊中輸入名稱來搜尋特定資料來源。或者,您可以滾動瀏覽按時間序列 日誌記錄 ...

Prometheus之服務發現介紹

對於中大型的系統環境或具有較強動態性的雲計算環境來說,靜態配置顯然難以使用 因此,prometheus為此專門設計了一組服務發現機制,以便於能夠基於服務註冊中自動發現 檢測 分類可被監控的各target,以及更新發生了變動的target 配置標籤會在抓取的生命週期中被重複利用以生成其它標籤,例如,指...