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 and this is my "lite" technical blog!

I'm a passionate DevOps engineer, Cloud/Kubernetes specialist, Free/Open source geek, and an author.

I believe in self CI/CD (Continuous Improvements/Development), also that "the whole is greater than the sum of its parts".

DevOps transformation, automation, data, and metrics are my preferred areas. And I like to help both businesses and people to grow.

Contact Me


Email *

Message *

Latest Post

DevOps is not only a culture - Discussion Panel

Today is my second session JobStack 2023 after my previous one yesterday titled " Platform Engineering: Manage your infrastructure u...

Popular Posts

Blog Archive