feat: add infrastructure automation and diagnostic scripts for Zabbix, Nginx, and Authentik
This commit is contained in:
11
scripts/check_npm_streams.py
Normal file
11
scripts/check_npm_streams.py
Normal file
@@ -0,0 +1,11 @@
|
||||
import paramiko
|
||||
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect('140.44.4.71', username='root', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
|
||||
stdin, stdout, stderr = ssh.exec_command("python3 -c \"import sqlite3; con = sqlite3.connect('/var/lib/docker/volumes/nginx-proxy-manager_nginx-data/_data/database.sqlite'); print(list(con.execute('SELECT id, incoming_port, forwarding_host, forwarding_port, is_deleted FROM stream')))\"")
|
||||
print("STREAMS:", stdout.read().decode())
|
||||
print("ERR:", stderr.read().decode())
|
||||
|
||||
ssh.close()
|
||||
Reference in New Issue
Block a user