Nagios Exchange Nagios Exchange
  • Home
  • Directory
  • Library
  • Support
  • About
  • Submit Feedback

Advanced Search

Build precise queries to find exactly what you need

Search Logic

Select compatible versions

Press ESC to close

Sign In Sign Up

Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More

  • Home
  • Directory
  • Library
  • Support
  • About
  • Submit Feedback
Plugins4406Themes and Skins13Add-ons760Graphics and Logos36View All Categories
LinuxSecuritySNMPFile SystemCloud
New Listings Recently Updated Listings Most Favored Listings Most Popular Listings Most Rated Listings Most Reviewed Listings
Random Project
VMWare vSphere monitoring plugin/Configuration Wizard
0.0 (0)
5.8K
RSS Feed
Newest Listings Updated Listings
Top Contributors
deskwork_itunes142 (4)Davide Lemma (3)Chad Columbus (3)Marcin Bednarski (3)Andrea Bolongaro (2)
See More
Newest Contributors
pawal (1)matthewducey (1)Linuxfabrik (1)signalgrid (1)Sanna Glue (2)
See More

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home > Andrey Kishkin
AK

Andrey Kishkin

@Graff

User Stats

Member Since: November 27, 2017

Favorites0

Views

Projects0

No Projects Found
Check cPanel License

Update for current HTML Layout

#!/usr/bin/env python # This script is a Nagios plugin used to check the status # of a CPanel license # # Author: Christopher Thunes # Date: 15 June 2007 # License: BSD License # # Updater: Andrey Kishkin aka Graff # Date: 27 November 2017 # %s should be put in place of the ip address LICENSE_CHECK_URL = "http://verify.cpanel.net/index.cgi?ip=%s" # Regex string to search for the 'active' keyword #regexExtractURL = r"[^a-zA-Z0-9]*active[^a-zA-Z0-9" ) argsparser.add_option("-H", "--hostname", dest="host", help="Host to run test on" ) (options, args) = argsparser.parse_args() # Check for the required hostname if options.host == None: print "-H or --hostname is required" sys.exit(3) numeric = None try: address = socket.gethostbyname(options.host) except socket.gaierror: printOutput( 2 ) html = urllib.urlopen( LICENSE_CHECK_URL % (address) ) regex = re.compile(regexExtractURL) if html == None: printOutput( 3 ) found = False; for line in html.readlines(): if regex.search(line): found = True if found is False: printOutput( 1 ) html = urllib.urlopen( LICENSE_CHECK_URL % (address) ) for line in html.readlines(): match = re.search(regexAcivatedDate ,line) if match: printOutput ( 0, match.group('date')) def printOutput ( numeric, date = '' ): returnValues = ( 0, 2, 2, 2 ) if numeric == 0: print "CPANEL OK: license active, Activated: ", date elif numeric == 1: print "CPANEL CRITICAL: license inactive" elif numeric == 2: print "CPANEL CRITICAL: could not resolve hostname" elif numeric == 3: print "CPANEL CRITICAL: could not load license page" sys.exit(returnValues[numeric]) if __name__ == "__main__": main( )

Reviewed 9 years ago

No Favorites Found

Copyright © 2009-2026 Nagios Enterprises, LLC. All rights reserved.

Privacy PolicyTerms of UseTrademarks
Home Browse Submit Profile