V1rus Private
User / IP
:
216.73.217.108
Host / Server
:
190.92.174.125 / aerosofthealthcare.com
System
:
Linux s3739.bom1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
Cmd
|
Upload
|
Mass Deface
|
Create
|
Sym
:
/
lib64
/
nagios
/
plugins
/
Viewing: check_proxmox.sh
#!/bin/bash # check_proxmox - check proxmox core services and statuses # Requirements: # Author: Tsvetan Gerov <tsvetan@worldhost.group> # Version 0.1 # Initialize flags and error message CRTIICAL=false WARNING=false ERROR_MESSAGE="" check_pveproxy(){ if ! systemctl is-active pveproxy >/dev/null 2>&1; then CRTIICAL=true ERROR_MESSAGE+="PVE Proxy is down, " fi } check_cluster(){ CSTATUS=$(pvesh get /cluster/status --output-format=yaml | grep quorate | awk '{print$2}') if [ "$CSTATUS" != "1" ]; then CRTIICAL=true ERROR_MESSAGE+="Check Cluster Quorum, " fi } # Perform checks check_pveproxy check_cluster # Return final state if [ "$CRTIICAL" = true ]; then echo "[CRTIICAL] ${ERROR_MESSAGE%, }" exit 2 elif [ "$WARNING" = true ]; then echo "[WARNING] ${ERROR_MESSAGE%, }" exit 1 else echo "[OK] All services are running correctly." exit 0 fi
Coded With 💗 by
HanzOFC