예제 #1
0
파일: stats.py 프로젝트: sempervictus/maas
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)