当前位置:网站首页>Prometheus pushgateway

Prometheus pushgateway

2022-06-24 13:38:00 51CTO

Prometheus It is an open source monitoring and alarm system ,PushGateway Is one of the components . This component is used to collect the pushed data and provide it for Prometheus To pull .


stay Prometheus Of In the design concept , Metrics are best exposed in a fixed interface , And update it regularly .Prometheus It will periodically pull data from this interface to Prometheus In the database of , The development team thinks this mode is the most appropriate for monitoring , This pull mode has several advantages .


First of all , from Server The client can accurately control how much data is obtained at a time .

second , When the amount of data increases , Whether through horizontal segmentation or , It is better to split vertically , Just adjust the server .

Third , The client will be relatively easy , Just be a quiet and beautiful man , Do your own thing -- Exposure indicators are good , Don't care Server Where is the , You don't need to worry about whether the indicators are pushed successfully .


So completely in this mode ,Prometheus It's still perfect , But there will always be people who want something different , Based on different scenarios , Someone will want to push data to Prometheus . To solve the problem of data push ,Prometheus Our development team developed PushGateway, You can push the data to PushGateway , then Prometheus Again from PushGateway Pull data , In this way, there is no need to modify Prometheus Design idea , It can also be compatible with a small number of scenarios .


The development team has repeatedly emphasized in the documentation , This is only applicable to individual scenarios with a small amount of data . But now that this is done , Someone will always zoom in on this scene . for instance , For big data Flink Application monitoring ,Flink Is compatible Prometheus Of , And it provides 2 Patterns , One is based on Prometheus Pull mode , Will expose specific ports for Prometheus To pull ; One is the push mode , Pushed to the PushGateway. Find... On the network Flink Monitoring scheme of , I don't know how other technical teams handle it , There are many Internet-based Yarn All management modes are recommended Pushed to the PushGateway In this way .


But it's against Prometheus Design concept of , And there will be PushGateway Large memory and TTL Clean up the problem , A lot of people PushGateway Of Issue Letitian adds something similar TTL To solve this problem , The response from the development team was , In the many scenarios illustrated , It's all against Prometheus Scene of design concept , So refuse to add similar TTL The function of . I do understand Prometheus The idea of the development team , But the needs of enterprise business teams also need to be addressed . We are still looking for a solution , Find it and share it with you .

原网站

版权声明
本文为[51CTO]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206241233192394.html