![]() ![]() Yield GaugeMetricFamily( 'my_gauge', 'Help text', value = 7)Ĭ = CounterMetricFamily( 'my_counter_total', 'Help text', labels =) core import GaugeMetricFamily, CounterMetricFamily, REGISTRY class CustomCollector( object): You can use a special handler to set the Authorization header.įrom prometheus_client. If the push gateway you are connecting to is protected with HTTP Basic Auth, Instance_ip_grouping_key returns a grouping key with the instance label set Same name and grouping key and delete_from_gateway deletes metrics with the With the same grouping key, pushadd_to_gateway only replaces metrics with the Pushgateway functions take a grouping key. Such as those from the Process Collector. Push_to_gateway( 'localhost:9091', job = 'batchA', registry = registry)Ī separate registry is used, as the default registry may contain other metrics G = Gauge( 'job_last_success_unixtime', 'Last time a batch job successfully finished', registry = registry) Other information about the process for free! Installationįrom prometheus_client import CollectorRegistry, Gauge, push_to_gateway registry = CollectorRegistry() In addition if you're on Linux the process metrics expose CPU, memory and ![]() Prometheus's rate function allows calculation of both requests per second,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |