forked from evolix/evocheck
Merge branch 'fix-mysqlnrpe' of evolix/evocheck into master
This commit is contained in:
commit
144ae5f7a5
17
evocheck.sh
17
evocheck.sh
|
@ -891,12 +891,17 @@ check_mysqlmunin() {
|
|||
}
|
||||
check_mysqlnrpe() {
|
||||
if is_debian_stretch && is_installed mariadb-server; then
|
||||
nagios_file="~nagios/.my.cnf"
|
||||
{ test -f $nagios_file \
|
||||
&& [ "$(stat -c %U $nagios_file)" = "nagios" ] \
|
||||
&& [ "$(stat -c %a $nagios_file)" = "600" ] \
|
||||
&& grep -q -F "command[check_mysql]=/usr/lib/nagios/plugins/check_mysql -H localhost -f $nagios_file";
|
||||
} || failed "IS_MYSQLNRPE"
|
||||
nagios_file=~nagios/.my.cnf
|
||||
|
||||
if ! test -f ${nagios_file}; then
|
||||
failed "IS_MYSQLNRPE" "${nagios_file} is missing"
|
||||
elif [ "$(stat -c %U ${nagios_file})" != "nagios" ] \
|
||||
|| [ "$(stat -c %a ${nagios_file})" != "600" ]; then
|
||||
failed "IS_MYSQLNRPE" "${nagios_file} has wrong permissions"
|
||||
else
|
||||
grep -q -F "command[check_mysql]=/usr/lib/nagios/plugins/check_mysql" /etc/nagios/nrpe.d/evolix.cfg \
|
||||
|| failed "IS_MYSQLNRPE" "check_mysql is missing"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
check_phpevolinuxconf() {
|
||||
|
|
Loading…
Reference in a new issue