Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_plesk_licence
2013-10-13
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios XI
- Nagios Fusion
- Nagios Reactor
GPL
31917
File | Description |
---|---|
check_plesk_license | check_plesk_license |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Reviews (1)
bywrufeger, April 15, 2024
reading password from etc/psa/.psa.shadow does not work, rest of script updated to work with current plesk and php8:
#!/usr/bin/env php
xpath('server/get/result/key');
if ($nodes) {
foreach ($nodes[0]->property as $n) {
if ($n->name == 'lim_date') {
$node = $n->value;
break;
}
}
}
if (empty($node)) {
fwrite(STDERR, "UNKNOWN: Could not retrieve license info from server response\n");
exit(NAGIOS_RETURN_UNKNOWN);
}
$expirationDate = (string) $node[0];
$future = strtotime($expirationDate);
$now = strtotime("now");
$diff = $future - $now;
$daysToExpire = floor($diff/86400);
if ($daysToExpire
#!/usr/bin/env php
xpath('server/get/result/key');
if ($nodes) {
foreach ($nodes[0]->property as $n) {
if ($n->name == 'lim_date') {
$node = $n->value;
break;
}
}
}
if (empty($node)) {
fwrite(STDERR, "UNKNOWN: Could not retrieve license info from server response\n");
exit(NAGIOS_RETURN_UNKNOWN);
}
$expirationDate = (string) $node[0];
$future = strtotime($expirationDate);
$now = strtotime("now");
$diff = $future - $now;
$daysToExpire = floor($diff/86400);
if ($daysToExpire