mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-04-25 16:36:21 +02:00
* Starting to spawn base package * More package hacking * Bedrock and VertexAI * Parquet split * Updated templates * Utils
24 lines
456 B
Python
Executable file
24 lines
456 B
Python
Executable file
#!/usr/bin/env python3
|
|
|
|
import requests
|
|
import tabulate
|
|
|
|
url = 'http://localhost:9090/api/v1/query?query=processor_state%7Bprocessor_state%3D%22running%22%7D'
|
|
|
|
resp = requests.get(url)
|
|
|
|
obj = resp.json()
|
|
|
|
tbl = [
|
|
[
|
|
m["metric"]["job"],
|
|
"running" if int(m["value"][1]) > 0 else "down"
|
|
]
|
|
for m in obj["data"]["result"]
|
|
]
|
|
|
|
print(tabulate.tabulate(
|
|
tbl, tablefmt="pretty", headers=["processor", "state"],
|
|
stralign="left"
|
|
))
|
|
|