普罗米修斯的例子
推送网关
使用prometheus_client
from prometheus_client import CollectorRegistry , Gauge , push_to_gateway
registry = CollectorRegistry ()
g = Gauge ( 'test_last_success_time' , 'Last time a batch job successfully finished' , registry = registry )
g . set_to_current_time ()
push_to_gateway ( 'http://pushgateway:9091' , job = 'test_job_client' , registry = registry )
使用requests (http)
url = 'ht