Mercurial > code > home > repos > mqtt_metrics
comparison victoriametrics_write.py @ 7:a640efa9fb01
logging
author | drewp@bigasterisk.com |
---|---|
date | Sat, 10 Aug 2024 23:05:18 -0700 |
parents | cd1b8d7bda78 |
children |
comparison
equal
deleted
inserted
replaced
6:bc2a93b306e9 | 7:a640efa9fb01 |
---|---|
15 "__name__": metricEvent['name'] | 15 "__name__": metricEvent['name'] |
16 } | labelDict, | 16 } | labelDict, |
17 "values": [metricEvent['value']], | 17 "values": [metricEvent['value']], |
18 "timestamps": [int(t * 1000)], | 18 "timestamps": [int(t * 1000)], |
19 } | 19 } |
20 log.info(promBody) | 20 # log.info(promBody) |
21 req = httpx.post( | 21 req = httpx.post( |
22 self.agentImportUrl, | 22 self.agentImportUrl, |
23 json=promBody, | 23 json=promBody, |
24 headers={'content-type': 'application/stream+json'}, | 24 headers={'content-type': 'application/stream+json'}, |
25 ) | 25 ) |