feat: add various infrastructure check and automation scripts
This commit is contained in:
11
scripts/test_shipyard_metrics.py
Normal file
11
scripts/test_shipyard_metrics.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import paramiko
|
||||
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect('140.44.4.71', username='snarf', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
_, o, _ = c.exec_command("curl -s http://127.0.0.1:9100/metrics | grep -E '^node_load1 '")
|
||||
print("Node exporter test:", o.read().decode().strip())
|
||||
_, o2, _ = c.exec_command("curl -s http://127.0.0.1:8080/metrics | grep -E '^container_last_seen' | head -3")
|
||||
print("cAdvisor test:\n", o2.read().decode().strip())
|
||||
c.close()
|
||||
|
||||
Reference in New Issue
Block a user