install php https://infotechys.com/install-php-8-3-on-rhel-9-centos-9/
1. create bash monitoring
[root@teguhth03 web]# cat /data/web/server31.sh
#!/bin/bash
# Variabel koneksi
USER="admin"
PASS="xxxxx"
HOST="10.10.10.31"
PORT="3306"
# Test koneksi ke MySQL server
mysql --skip-ssl -u$USER -p$PASS -h$HOST -P$PORT -e "SELECT 1;" >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "{ \"connections\": \"\", \"role\": \"Down\", \"gtid\": \"\",\"hostname\": \"$hostnamex\", \"host\": \"$HOST\", \"port\": \"$PORT\",\"dbv\": \"$versionx\",\"osv\": \"$osx\" }"
exit 0
fi