示例#1
0
def push_stats_to_prometheus(maas_name, push_gateway):
    metrics = create_metrics(STATS_DEFINITIONS,
                             registry=prom_cli.CollectorRegistry())
    update_prometheus_stats(metrics)
    prom_cli.push_to_gateway(push_gateway,
                             job="stats_for_%s" % maas_name,
                             registry=metrics.registry)
示例#2
0
def push_stats_to_prometheus(maas_name, push_gateway):
    metrics = create_metrics(STATS_DEFINITIONS)
    update_prometheus_stats(metrics)
    prom_cli.push_to_gateway(push_gateway,
                             job='stats_for_%s' % maas_name,
                             registry=metrics.registry)