Nagios script to check cPanel license

As I remember, this script is one of my first scripts, it's really simple, it was some kind of 30 seconds script to solve a problem :D

It uses cPanel APIs to check cPanel license for this IP/Hostname, and If it not active, Nagios/Opsview will notify you ... that's it :-)

# Simple (really simple :D) Nagios script to check cPanel license.
# ./check_cpanel_license.sh -H SERVER_IP/HOSTNAME (or $HOSTADDRESS$ in Nagios/Opsview)
# BY:
# Ahmed M. AbouZaid

if [ "$1" = "-H" ]; then
  curl -s http://verify.cpanel.net/verifyFeed.cgi?ip=$2 | grep -q 'status="1"';
  if [ $? = 0 ]; then
    echo "OK - CPANEL license is active."
    exit 0
    echo "CRITICAL - CPANEL license is inactive."
    exit 2
  echo "Usage: $0 [OPTION]"
  echo "-H IP/Hostname"
Powered by Blogger.

Hello, my name is Ahmed AbouZaid, I'm a passionate Tech Lead DevOps Engineer. 👋

With 16+ years of open-source contributions, 12+ years of professional hands-on experience in DevOps, and an M.Sc. in Data Engineering from Edinburgh Napier University (UK), I enjoy facilitating the growth of both businesses and individuals.

I specialize in Cloud-Native and Kubernetes. I'm also a Free/Open source geek and book author. My favorite topics are DevOps transformation, automation, data, and metrics.

Contact Me


Email *

Message *

Start Your DevOps Engineer Journey!

Start Your DevOps Engineer Journey!
Start your DevOps career for free the Agile way in 2024 with the Dynamic DevOps Roadmap ⭐

Latest Post

Gomplate v4 is here! - Tools

This year, one of my nice discoveries was gomplate , a fast template renderer supporting many data sources and hundre...

Popular Posts

Blog Archive