Warning: opendir(/var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/sh/3.0.83.2/scripts/): failed to open dir: No such file or directory in /var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php on line 26

Warning: Invalid argument supplied for foreach() in /var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php on line 170
Skip to content

Shellscript - Nagios Plugins - UCARP



 
UCARP-Master
 
#!/bin/sh

virtuelle_ip=192.168.0.1
interface=eth1:1

/sbin/ifconfig $interface | grep $virtuelle_ip &> /dev/null

        if [ $? = 1 ]; then
                echo "CRITICAL – Virtual IP $ip on master"
                exit 1
        else
                /sbin/ifconfig $interface | grep $virtuelle_ip | cut -f 2 -d ":" | while read output;
        do
                ip=$(echo $output | awk ‘{print $1}’ )
                echo "OK – Virtual IP on master"
                exit 0
        done
fi
 
UCARP-Slave
 
#!/bin/sh

virtuelle_ip=192.168.0.1
interface=eth1:1

/sbin/ifconfig $interface | grep $virtuelle_ip &> /dev/null

        if [ $? = 1 ]; then
                echo "OK – No Virtual IP on slave"
                exit 0
        else
                /sbin/ifconfig $interface | grep $virtuelle_ip | cut -f 2 -d ":" | while read output;
        do
                ip=$(echo $output | awk ‘{print $1}’ )
                echo "CRITICAL – Virtual IP $ip on slave"
                exit 1
        done
fi


Imprint | Contact | Privacy Statement

Warning: opendir(/var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/sh/3.0.83.2/scripts/): failed to open dir: No such file or directory in /var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php on line 26

Warning: Invalid argument supplied for foreach() in /var/www/html/web1/serendipity/plugins/serendipity_event_dpsyntaxhighlighter/serendipity_event_dpsyntaxhighlighter.php on line 170