feat: add various infrastructure check and automation scripts
This commit is contained in:
14
scripts/check_grafana_ds.py
Normal file
14
scripts/check_grafana_ds.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import requests
|
||||
import json
|
||||
import urllib3
|
||||
urllib3.disable_warnings()
|
||||
|
||||
auth = ("admin", "Katzir476!!!")
|
||||
# Let's query Prometheus datasource from Grafana or directly from 140.44.4.11/140.44.4.34
|
||||
url = "https://grafana.snarfnet.net/api/datasources"
|
||||
resp = requests.get(url, auth=auth, verify=False, timeout=10)
|
||||
datasources = resp.json()
|
||||
print("Datasources:")
|
||||
for ds in datasources:
|
||||
print(f"ID: {ds['id']} | Name: {ds['name']} | Type: {ds['type']} | URL: {ds['url']}")
|
||||
|
||||
Reference in New Issue
Block a user