feat: add homelab deployment configs, documentation, and automation scripts
This commit is contained in:
14
scripts/find_all_prom.py
Normal file
14
scripts/find_all_prom.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import paramiko
|
||||
|
||||
def find_prom(ip, name):
|
||||
c = paramiko.SSHClient()
|
||||
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
c.connect(ip, username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
print(f"=== {name} ({ip}) ===")
|
||||
_, o, _ = c.exec_command("kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}/status: {.metadata.name}{ \"\\t\" }{.spec.containers[*].image}{\"\\n\"}{end}' | grep -i prom")
|
||||
print(o.read().decode())
|
||||
c.close()
|
||||
|
||||
find_prom('140.44.4.11', 'Aerodrome')
|
||||
find_prom('140.44.4.41', 'Spaceport')
|
||||
|
||||
Reference in New Issue
Block a user