HEX
Server: LiteSpeed
System: Linux s12873.lon1.stableserver.net 5.14.0-611.11.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Dec 3 09:47:37 EST 2025 x86_64
User: jairicem (1242)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //lib64/nagios/plugins/check_mysql_log
#!/bin/bash

if sudo grep -q "'\[ERROR\]'" /var/lib/mysql/`hostname`.err; then 
    echo "CRITICAL: There are errors in the error log!"
    exit 2;
else
    echo "OK"
fi