mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-09-20 22:37:44 +00:00
Add telnet server
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import tornado
|
||||
from prometheus_client import CONTENT_TYPE_LATEST
|
||||
|
||||
from core.prometheus_metrics_handler import get_metrics
|
||||
|
||||
|
||||
class PrometheusMetricsHandler(tornado.web.RequestHandler):
|
||||
"""Handler for Prometheus metrics endpoint"""
|
||||
|
||||
def get(self):
|
||||
self.write(get_metrics())
|
||||
self.set_status(200)
|
||||
self.set_header("Content-Type", CONTENT_TYPE_LATEST)
|
||||
Reference in New Issue
Block a user