����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 3.144.162.109 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /lib64/nagios/plugins/extra/ |
Upload File : |
#!/usr/bin/env perl use strict; use warnings; use Getopt::Long; my $warn_days = 4; my $min_cpu; GetOptions( 'warn-days=i' => \$warn_days, 'min-cpu:i' => \$min_cpu, ) or die("Usage --warn-days 10 <--min-cpu 2>?\n"); my $out = `/usr/local/lsws/bin/lshttpd -V &>/dev/stdout`; $out =~ m/Leased license key \d+? will expire in (\d+) days!/; my @ncpu = `ps -u nobody -o cmd | grep "litespeed (lshttpd" | sort -nk4 | uniq`; my $ncpu = @ncpu; my $days_to_expire = $1; my $exit_code = 0; $exit_code = 1 if ( ( defined $min_cpu && $ncpu >= $min_cpu ) || $days_to_expire <= $warn_days ); $exit_code ? print 'WARN - ' : print 'OK - '; print "litespeed license for $ncpu-CPU expire on $days_to_expire days\n"; exit $exit_code;