How to use aioprometheus - 6 common examples

To help you get started, we’ve selected a few aioprometheus examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github MatterMiners / tardis / tardis / plugins / prometheusmonitoring.py View on Github external
def __init__(self):
        config = Configuration().Plugins.PrometheusMonitoring

        self._port = config.port
        self._addr = config.addr

        self._svr_started = False
        self._drones = {}

        self._svr = Service()

        self._gauges = {
            ResourceStatus.Booting: Gauge("booting", "Booting drones"),
            ResourceStatus.Running: Gauge("running", "Running drones"),
            ResourceStatus.Stopped: Gauge("stopped", "Stopped drones"),
            ResourceStatus.Deleted: Gauge("deleted", "Deleted drones"),
            ResourceStatus.Error: Gauge("error", "Drones in error state"),
        }

        for gauge in self._gauges.values():
            self._svr.register(gauge)
            gauge.set({}, 0)
github MatterMiners / tardis / tardis / plugins / prometheusmonitoring.py View on Github external
def __init__(self):
        config = Configuration().Plugins.PrometheusMonitoring

        self._port = config.port
        self._addr = config.addr

        self._svr_started = False
        self._drones = {}

        self._svr = Service()

        self._gauges = {
            ResourceStatus.Booting: Gauge("booting", "Booting drones"),
            ResourceStatus.Running: Gauge("running", "Running drones"),
            ResourceStatus.Stopped: Gauge("stopped", "Stopped drones"),
            ResourceStatus.Deleted: Gauge("deleted", "Deleted drones"),
            ResourceStatus.Error: Gauge("error", "Drones in error state"),
        }

        for gauge in self._gauges.values():
            self._svr.register(gauge)
            gauge.set({}, 0)
github MatterMiners / tardis / tardis / plugins / prometheusmonitoring.py View on Github external
config = Configuration().Plugins.PrometheusMonitoring

        self._port = config.port
        self._addr = config.addr

        self._svr_started = False
        self._drones = {}

        self._svr = Service()

        self._gauges = {
            ResourceStatus.Booting: Gauge("booting", "Booting drones"),
            ResourceStatus.Running: Gauge("running", "Running drones"),
            ResourceStatus.Stopped: Gauge("stopped", "Stopped drones"),
            ResourceStatus.Deleted: Gauge("deleted", "Deleted drones"),
            ResourceStatus.Error: Gauge("error", "Drones in error state"),
        }

        for gauge in self._gauges.values():
            self._svr.register(gauge)
            gauge.set({}, 0)
github MatterMiners / tardis / tardis / plugins / prometheusmonitoring.py View on Github external
def __init__(self):
        config = Configuration().Plugins.PrometheusMonitoring

        self._port = config.port
        self._addr = config.addr

        self._svr_started = False
        self._drones = {}

        self._svr = Service()

        self._gauges = {
            ResourceStatus.Booting: Gauge("booting", "Booting drones"),
            ResourceStatus.Running: Gauge("running", "Running drones"),
            ResourceStatus.Stopped: Gauge("stopped", "Stopped drones"),
            ResourceStatus.Deleted: Gauge("deleted", "Deleted drones"),
            ResourceStatus.Error: Gauge("error", "Drones in error state"),
        }

        for gauge in self._gauges.values():
            self._svr.register(gauge)
            gauge.set({}, 0)
github MatterMiners / tardis / tardis / plugins / prometheusmonitoring.py View on Github external
def __init__(self):
        config = Configuration().Plugins.PrometheusMonitoring

        self._port = config.port
        self._addr = config.addr

        self._svr_started = False
        self._drones = {}

        self._svr = Service()

        self._gauges = {
            ResourceStatus.Booting: Gauge("booting", "Booting drones"),
            ResourceStatus.Running: Gauge("running", "Running drones"),
            ResourceStatus.Stopped: Gauge("stopped", "Stopped drones"),
            ResourceStatus.Deleted: Gauge("deleted", "Deleted drones"),
            ResourceStatus.Error: Gauge("error", "Drones in error state"),
        }

        for gauge in self._gauges.values():
            self._svr.register(gauge)
            gauge.set({}, 0)
github MatterMiners / tardis / tardis / plugins / prometheusmonitoring.py View on Github external
def __init__(self):
        config = Configuration().Plugins.PrometheusMonitoring

        self._port = config.port
        self._addr = config.addr

        self._svr_started = False
        self._drones = {}

        self._svr = Service()

        self._gauges = {
            ResourceStatus.Booting: Gauge("booting", "Booting drones"),
            ResourceStatus.Running: Gauge("running", "Running drones"),
            ResourceStatus.Stopped: Gauge("stopped", "Stopped drones"),
            ResourceStatus.Deleted: Gauge("deleted", "Deleted drones"),
            ResourceStatus.Error: Gauge("error", "Drones in error state"),
        }

        for gauge in self._gauges.values():
            self._svr.register(gauge)
            gauge.set({}, 0)

aioprometheus

A Prometheus Python client library for asyncio-based applications

MIT
Latest version published 12 months ago

Package Health Score

65 / 100
Full package analysis

Popular aioprometheus functions