crafty-4/app/classes/web/routes/metrics/metrics_handlers.py

25 lines
685 B
Python
Raw Normal View History

2023-09-03 14:04:28 +00:00
from app.classes.web.routes.metrics.index import ApiOpenMetricsIndexHandler
2023-10-07 21:50:56 +00:00
from app.classes.web.routes.metrics.host import ApiOpenMetricsCraftyHandler
2023-09-03 14:04:28 +00:00
from app.classes.web.routes.metrics.servers import ApiOpenMetricsServersHandler
def metrics_handlers(handler_args):
return [
# OpenMetrics routes
(
2023-10-07 21:50:56 +00:00
r"/metrics/?",
2023-09-03 14:04:28 +00:00
ApiOpenMetricsIndexHandler,
handler_args,
),
(
2023-10-07 21:50:56 +00:00
r"/metrics/host/?",
ApiOpenMetricsCraftyHandler,
handler_args,
),
(
r"/metrics/servers/([0-9]+)/?",
2023-09-03 14:04:28 +00:00
ApiOpenMetricsServersHandler,
handler_args,
),
]