Compare commits
No commits in common. "b7bca571a89e3492709eb3f447039631ec37269b" and "820e2a64d0642bbb06335565e0808158071a592a" have entirely different histories.
b7bca571a8
...
820e2a64d0
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Backup check for Check_MK
|
# Backup check for Check_MK
|
||||||
# Installed by PVC ansible
|
# Installed by BLSE 2.0 ansible
|
||||||
|
|
||||||
SHARELIST=( $( cat /var/backups/shares ) )
|
SHARELIST=( $( cat /var/backups/shares ) )
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Apt and dpkg status check for Check_MK
|
# Apt and dpkg status check for Check_MK
|
||||||
# Installed by PVC ansible
|
# Installed by BLSE 2.0 ansible
|
||||||
|
|
||||||
TMP_DPKG="$( COLUMNS=200 dpkg --list )"
|
TMP_DPKG="$( COLUMNS=200 dpkg --list )"
|
||||||
TMP_AWK="$( awk '
|
TMP_AWK="$( awk '
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Entropy availability check for Check_MK
|
# Entropy availability check for Check_MK
|
||||||
# Installed by PVC ansible
|
# Installed by BLSE 2.0 ansible
|
||||||
|
|
||||||
if [ -e /proc/sys/kernel/random/entropy_avail ]; then
|
if [ -e /proc/sys/kernel/random/entropy_avail ]; then
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Open file handle freshness check for Check_MK
|
# Open file handle freshness check for Check_MK
|
||||||
# Installed by PVC ansible
|
# Installed by BLSE 2.0 ansible
|
||||||
|
|
||||||
OK=0
|
OK=0
|
||||||
WARNING=1
|
WARNING=1
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Lights-out management reachability check for Check_MK
|
|
||||||
# Installed by PVC ansible
|
|
||||||
|
|
||||||
# We need a defined IPMI interface to continue
|
|
||||||
if [[ ! -f /etc/network/interfaces.d/ipmi ]]; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# We need ipmitool and fping to continue
|
|
||||||
if ! which ipmitool >/dev/null 2>&1 || ! which fping >/dev/null 2>&1 ; then
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "<<<ipmi>>>"
|
|
||||||
|
|
||||||
# Grab IPMI IP from interfaces file
|
|
||||||
IPMIIP_INTERFACES=$(grep 'ipmitool' /etc/network/interfaces.d/ipmi | grep -v 'defgw' | grep 'ipaddr' | awk '{ print $NF }')
|
|
||||||
if [[ -z ${IPMIIP_INTERFACES} ]]; then
|
|
||||||
echo "No IPMI IP defined in interfaces file"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Grab IPMI IP from ipmitool
|
|
||||||
IPMIIP_IPMITOOL="$( ipmitool lan print 2>/dev/null | grep 'IP Address' | grep -v 'Source' | awk '{ print $NF }' )"
|
|
||||||
|
|
||||||
if [[ -z ${IPMIIP_IPMITOOL} ]]; then
|
|
||||||
echo "No IPMI IP returned by ipmitool"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
if [[ ${IPMIIP_INTERFACES} != ${IPMIIP_IPMITOOL} ]]; then
|
|
||||||
echo "IPMI IP defined in interfaces file (${IPMIIP_INTERFACES}) is different from ipmitool (${IPMIIP_IPMITOOL})"
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Try pinging the IPMI IP; this should work and be quick
|
|
||||||
fping -q -t 200 ${IPMIIP_INTERFACES}
|
|
||||||
RESULT=$?
|
|
||||||
|
|
||||||
if [[ ${RESULT} -eq 0 ]]; then
|
|
||||||
echo "IPMI IP (${IPMIIP_INTERFACES}) is correct and reachable"
|
|
||||||
exit
|
|
||||||
else
|
|
||||||
echo "IPMI IP (${IPMIIP_INTERFACES}) is unreachable"
|
|
||||||
exit
|
|
||||||
fi
|
|
|
@ -1,17 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# File ownership check for Check_MK
|
# File ownership check for Check_MK
|
||||||
# Installed by PVC ansible
|
# Installed by BLSE 2.0 ansible
|
||||||
|
|
||||||
UID_MAX=199
|
UID_MAX=299
|
||||||
# http://www.debian.org/doc/debian-policy/ch-opersys.html
|
# http://www.debian.org/doc/debian-policy/ch-opersys.html
|
||||||
# 0-99: Globally allocated by the Debian project
|
# 0-99: Globally allocated by the Debian project
|
||||||
# 100-199: (PVC) Dynamically allocated system users and groups
|
# 100-199: (BLSE) Dynamically allocated system users and groups
|
||||||
# 200-299: (PVC) provisioning users
|
# 200-299: (BLSE) BLSE users and groups
|
||||||
# 300-499: (PVC) reserved
|
# 300-499: (BLSE) reserved
|
||||||
# 500-599: (PVC) system administrators
|
# 500-599: (BLSE) system administrators
|
||||||
# 600-999: (PVC) reserved
|
# 600-999: (BLSE) reserved
|
||||||
# 64045: (PVC) ceph
|
# 64045: (BLSE) ceph
|
||||||
|
|
||||||
function is_element_of {
|
function is_element_of {
|
||||||
local TO_FIND=$1
|
local TO_FIND=$1
|
||||||
|
@ -47,9 +47,11 @@ for FILESYSTEM in ${FILESYSTEMs[@]}; do
|
||||||
-not \( -type d -a \( -path /media -o -path /mnt \) \) \
|
-not \( -type d -a \( -path /media -o -path /mnt \) \) \
|
||||||
-not \( -name '.*.swp' -a -mtime -3 \) \
|
-not \( -name '.*.swp' -a -mtime -3 \) \
|
||||||
-not \( -path '*/.git' -o -path '*/.git/*' \) \
|
-not \( -path '*/.git' -o -path '*/.git/*' \) \
|
||||||
|
-not \( -path '*.dirtrack.Storable' \) \
|
||||||
-not \( -path '/home/*' \) \
|
-not \( -path '/home/*' \) \
|
||||||
-not \( -path '/tmp/*' \) \
|
-not \( -path '/tmp/*' \) \
|
||||||
-not \( -path '/var/home/*' \) \
|
-not \( -path '/var/home/*' \) \
|
||||||
|
-not \( -path '/var/log/gitlab/*' \) \
|
||||||
-print0 2>/dev/null )
|
-print0 2>/dev/null )
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
@ -5,5 +5,3 @@
|
||||||
|
|
||||||
echo
|
echo
|
||||||
pvc -q status -f short
|
pvc -q status -f short
|
||||||
echo
|
|
||||||
pvc -q node list
|
|
||||||
|
|
Loading…
Reference in New Issue