feat(pillar-4): complete dual-npm keepalived HA cluster on VIP 140.44.4.70
This commit is contained in:
15
scripts/check_swarm_ports.py
Normal file
15
scripts/check_swarm_ports.py
Normal file
@@ -0,0 +1,15 @@
|
||||
import paramiko
|
||||
|
||||
def main():
|
||||
for ip in ['140.44.4.71', '140.44.4.72']:
|
||||
ssh = paramiko.SSHClient()
|
||||
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||
ssh.connect(ip, username='snarf', key_filename=r'C:\Users\Snarf\.ssh\id_ed25519_snarfnet', timeout=10)
|
||||
stdin, stdout, stderr = ssh.exec_command('sudo ss -tulpn | grep -E ":80 |:443 |:81 " || true')
|
||||
print(f"=== PORTS ON {ip} ===")
|
||||
print(stdout.read().decode())
|
||||
ssh.close()
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user