GRAYBYTE WORDPRESS FILE MANAGER2109

Server IP : 149.255.58.128 / Your IP : 216.73.216.44
System : Linux cloud516.thundercloud.uk 5.14.0-427.26.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 17 15:51:13 EDT 2024 x86_64
PHP Version : 8.2.28
Disable Function : allow_url_include, apache_child_terminate, apache_setenv, exec, passthru, pcntl_exec, posix_kill, posix_mkfifo, posix_getpwuid, posix_setpgid, posix_setsid, posix_setuid, posix_setgid, posix_seteuid, posix_setegid, posix_uname, proc_close, proc_get_status, proc_open, proc_terminate, shell_exec, show_source, system
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /lib64/nagios/plugins/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib64/nagios/plugins//check_mysql_replication.sh
#!/bin/sh
###################################################################
# The script is a plugin for nagios. The script is used to check
# the replication status between the Master and Slave. The script
# has to be executed from the master.
# Written by : Jithesh M K
# Created on : July, 2006
# Updates on : 09/12/15 Philip A. O'Malley (to make it work)
###################################################################

# Nagios alert status
STATE_OK=0
STATE_WARNING=1
STATE_CRITICAL=2
STATE_UNKNOWN=3
STATE_DEPENDENT=4

# Script Variables
SLAVEIP_1=
REPLUSERNAME=
REPLPASSWD=
CRITICAL_VALUE=3000
WARNING_VALUE=1500

# Command Overrides

while test -n "$1"; do
    case "$1" in
        --slavehost|-H)
             SLAVEIP_1=$2
             shift
            ;;
        --username|-u)
             REPLUSERNAME=$2
             shift
            ;;
        --password|-p)
             REPLPASSWD=$2
             shift
             ;;
        *)
            echo "Unknown argument: $1"
            exit $STATE_UNKNOWN
            ;;
    esac
    shift
done

# Calculations

iSlave_1=`mysql -h $SLAVEIP_1 -u $REPLUSERNAME -p$REPLPASSWD -e "show slave status" | grep bin | cut -f7`
iMaster=`mysql -u $REPLUSERNAME -p$REPLPASSWD -e "show master status" | grep bin | cut -f2`

if test -z $iSlave_1 
then
    echo "CRITICAL ERROR in IPC with $SLAVEIP_1"
    exit $STATE_CRITICAL
exit 
fi

if test -z $iSlave_1
then
    echo "CRITICAL ERROR in IPC with localhost"
    exit $STATE_CRITICAL
exit
fi

iDiff_1=`expr $iMaster - $iSlave_1`
perfData="replication_lag="$iDiff_1";"$WARNING_VALUE";"$CRITICAL_VALUE";0;"
if [ $iDiff_1 -gt $CRITICAL_VALUE ]
then
echo "CRITICAL Master Log Position : "$iMaster" 1st Slave Log Position : "$iSlave_1 " Difference : "$iDiff_1"|"$perfData
exit $STATE_CRITICAL
elif [ $iDiff_1 -gt $WARNING_VALUE ]
then
echo "WARNING Master Log Position : "$iMaster" 1st Slave Log Position : "$iSlave_1 " Difference : "$iDiff_1"|"$perfData
exit $STATE_WARNING
else
echo "OK Master Log Position : "$iMaster" 1st Slave Log Position : "$iSlave_1 " Difference : "$iDiff_1"|"$perfData
exit $STATE_OK
fi

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
April 28 2024 11:20:59
0 / root
0755
eventhandlers
--
April 28 2024 11:20:59
0 / root
0755
check_apache2.sh
10.779 KB
January 30 2013 12:21:10
0 / root
0755
check_cpu.sh
4.36 KB
February 12 2019 08:36:33
0 / root
0755
check_crm.pl
6.467 KB
September 17 2015 13:45:51
0 / root
0755
check_disk
53.047 KB
March 28 2024 13:15:48
0 / root
0755
check_iface.php
5.883 KB
September 29 2015 14:20:25
0 / root
0755
check_jetbackup
7.843 KB
July 29 2024 11:13:24
0 / root
0755
check_load
35.703 KB
March 28 2024 13:15:48
0 / root
0755
check_mem.pl
6.235 KB
January 28 2013 15:36:20
0 / root
0755
check_mpt.sh
2.267 KB
February 18 2015 18:15:28
0 / root
0755
check_mqueue_exiqgrep.sh
0.97 KB
February 27 2023 18:26:09
0 / root
0755
check_mqueue_postfix.sh
1.082 KB
February 13 2019 10:23:20
0 / root
0755
check_mysql.pl
27.219 KB
January 30 2013 13:09:36
0 / root
0755
check_mysql_replication.sh
2.065 KB
May 20 2010 10:29:33
0 / root
0755
check_raid.pl
114.584 KB
November 20 2015 12:37:21
0 / root
0755
check_service.sh
10.078 KB
October 30 2024 17:54:56
0 / root
0755
check_swap
31.719 KB
March 28 2024 13:15:48
0 / root
0755
error_log
0.551 KB
May 03 2024 08:18:25
0 / root
0644
negate
27.617 KB
March 28 2024 13:15:48
0 / root
0755
urlize
23.359 KB
March 28 2024 13:15:48
0 / root
0755
utils.sh
2.729 KB
March 28 2024 13:15:40
0 / root
0755

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF