Mercurial > code > home > repos > mqtt_metrics
changeset 7:a640efa9fb01
logging
author | drewp@bigasterisk.com |
---|---|
date | Sat, 10 Aug 2024 23:05:18 -0700 |
parents | bc2a93b306e9 |
children | 82cec89e6534 |
files | mqtt_metrics.py victoriametrics_write.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/mqtt_metrics.py Sat Aug 10 23:03:57 2024 -0700 +++ b/mqtt_metrics.py Sat Aug 10 23:05:18 2024 -0700 @@ -1,9 +1,9 @@ -import textwrap import asyncio import json import logging import os import re +import textwrap import time from typing import cast from weakref import WeakSet @@ -12,8 +12,8 @@ import uvicorn # v 2.0.0 from sse_starlette.sse import EventSourceResponse from starlette.applications import Starlette +from starlette.requests import Request from starlette.routing import Route -from starlette.requests import Request from starlette_exporter import PrometheusMiddleware, handle_metrics from convert import converters
--- a/victoriametrics_write.py Sat Aug 10 23:03:57 2024 -0700 +++ b/victoriametrics_write.py Sat Aug 10 23:05:18 2024 -0700 @@ -17,7 +17,7 @@ "values": [metricEvent['value']], "timestamps": [int(t * 1000)], } - log.info(promBody) + # log.info(promBody) req = httpx.post( self.agentImportUrl, json=promBody,