HEX
Server: LiteSpeed
System: Linux altar40.supremepanel40.com 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: sescorpcl (4477)
PHP: 8.2.32
Disabled: NONE
Upload Files
File: //usr/lib64/nagios/plugins/check_cpsrvd.sh
#!/bin/bash

CMD=$(sudo /usr/bin/pgrep -c cpsrvd)

crit_face=$(echo -ne "\x0\x01\xF6\x21" | iconv -f UTF-32BE -t UTF-8)
ok_face=$(echo -ne "\x0\x01\xF6\x01" | iconv -f UTF-32BE -t UTF-8)
warn_face=$(echo -ne "\x0\x01\xF6\x20" | iconv -f UTF-32BE -t UTF-8)
unknown_face=$(echo -ne "\x0\x01\xF6\x15" | iconv -f UTF-32BE -t UTF-8)

if (("$CMD" >= 10 && "$CMD" <= 15))
        then
	echo -e "$warn_face WARNING: cPanel processes count is [$CMD]\n"
        exit 1
elif (("$CMD" > 15))
        then
	echo -e "$crit_face CRITICAL: cPanel processes count is [$CMD]"
        exit 2
elif (("$CMD" < 1))
        then
	echo
	echo -e "$crit_face CRITICAL: cPanel processes count is [$CMD] - cPanel not running"
        exit 2
elif (("$CMD" > 0 && "$CMD" < 10))
        then
	echo -e "$ok_face OK: cPanel processes count is [$CMD]"
        exit 0
else
    	echo -e "$warn_face UNKNOWN: cannot get cPanel processes count"
        exit 3
fi