Email Alert for Host down using fping Rumi, October 26, 2020 A simplified bash script for host status alert: #!/bin/bash email=h.t.emdad@gmail.com NBR_DOWN=0 LOGFILE=/tmp/pinglog.txt echo "Server Down Status" > $LOGFILE for i in $(cat ping.txt); do fping $i >/dev/null if [ $? -ne 0 ]; then echo "$i is down" >> $LOGFILE NBR_DOWN=$((NBR_DOWN+1)) fi done if [ $NBR_DOWN -gt 0 ]; then mailx -s "Server Down Alert" $email < $LOGFILE fi The contents on ping.txt is like (entries are with new line entry: core-router host1 bc host2 host3 host4 cpanel If you do not have ‘mailx’ installed, install it using yum install mailx. Related Administrations Scripts AlertEmail Alertfping
Add PHP 7.4 support on Virtualmin GPL on CentOS 7 Distribution April 14, 2022 Install Remi Release repo and clear cache yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm && yum clean all Install PHP packages version 7.4 and/or 8.0 yum -y install php74-php-{cli,pdo,fpm,zip,gd,xml,mysqlnd,opcache,bcmath,imagick,mbstring} yum -y install php80-php-{cli,pdo,fpm,zip,gd,xml,mysqlnd,opcache,bcmath,imagick,mbstring} Configuring Individual Virtual Servers You can configure the PHP version being used for a specific Virtual Server by selecting Server Configuration… Read More
Debian/Ubuntu font installation using command June 7, 2024 Install a font manually by downloading the appropriate .ttf or otf files and placing them into /usr/local/share/fonts (system-wide), ~/.local/share/fonts (user-specific) or ~/.fonts (user-specific). These files should have the permission 644 (-rw-r–r–), otherwise they may not be usable. Run fc-cache to update the font cache (add -v for verbose output). The… Read More
MySQL Master-Master Replication October 26, 2014October 26, 2014 This article is about setting up MySQL Master-Master database replication between two Cloud Servers. Master-Master data replication allows for replicated data, stored on multiple computers, to be updated by any authorized contributing member of the group. This allows for more open collaboration than Master-Slave replication where any needed changes identified… Read More