一、Pushgetway 簡介
- Pushgateway 是 Prometheus 的一個組件,Prometheus server 默認(rèn)是通過 Exporter 主動獲取數(shù)據(jù)(默認(rèn)采取 pull 拉取數(shù)據(jù)),Pushgateway 則是通過 exporter 主動方式推送數(shù)據(jù)到 Pushgateway,再由 Prometheus 主動去拉取 Pushgateway 數(shù)據(jù),用戶可以寫一些自定義的監(jiān)控腳本把需要監(jiān)控的數(shù)據(jù)發(fā)送給 Pushgateway。從 Prometheus server 角度看,都是由 Prometheus server 主動去拉取各個數(shù)據(jù)源(如 Exporter 和 Pushgateway)的數(shù)據(jù)。
- Pushgateway 的優(yōu)點(diǎn):
-
- Prometheus 默認(rèn)采用定時 pull 模式拉取 targets 數(shù)據(jù),但是如果不在一個子網(wǎng)或者防火墻,Prometheus 就拉取不到 targets 數(shù)據(jù),因此可以采用各個 target 往 pushgateway 上 push 數(shù)據(jù),然后 Prometheus 去 Pushgateway 上定時 pull 數(shù)據(jù);
-
- 在監(jiān)控業(yè)務(wù)數(shù)據(jù)的時候,需要將不同數(shù)據(jù)匯總,匯總之后的數(shù)據(jù)可以由 Pushgateway 統(tǒng)一收集,然后由 Prometheus 統(tǒng)一拉取,起到給 Prometheus 減壓的作用;
-
- 自定義采集指標(biāo)簡單。
- Pushgateway 的缺點(diǎn):
-
- Prometheus 拉取狀態(tài)只針對 Pushgateway,不能對每個節(jié)點(diǎn)都有效;
文章來源地址http://www.zghlxwxcb.cn/news/detail-645750.html
文章來源:http://www.zghlxwxcb.cn/news/detail-645750.html
到了這里,關(guān)于云原生之深入解析Prometheus Pushgetway的原理分析和實戰(zhàn)操作的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!