5.02021-11-21T22:10:12ZTemplates/ApplicationsApp Citrix License SeverApp Citrix License Sever## Overview
This Template doesn't require any scripts on the target machine.
It is able to enumerate and discover the installed licenses.
Following properties will be monitored (to be extended):
* List of installed licenses
* License expiration
## Author
WorkSimple GmbH
Templates/ApplicationsCitrixCitrix Licenses discoverywmi.getall["ROOT\CitrixLicensing","SELECT SerialNumber FROM Citrix_GT_License WHERE SerialNumber <> ''"]5dCitrix License {#CITRIX_LIC} validity periodwmi.get["ROOT\CitrixLicensing","SELECT ExpirationDate FROM Citrix_GT_License WHERE SerialNumber = '{#CITRIX_LIC}'"]1huptimeCitrixJAVASCRIPTvar year = parseInt(value[0]+value[1]+value[2]+value[3]);
var month = parseInt(value[4]+value[5]);
var day = parseInt(value[6]+value[7]);
var expiry = new Date(year, month-1, day)
var current = new Date();
var duration = expiry - current;
duration = Math.floor(duration/1000);
return duration; {avg(#3)}<{$CITRIX_LIC.EXPIRY.WARN}Citrix License {#CITRIX_LIC} is about to expireExpires in {ITEM.LASTVALUE1}WARNINGYESCitrix Licenses validityNONO12774A4ALL- App Citrix License Severwmi.get["ROOT\CitrixLicensing","SELECT ExpirationDate FROM Citrix_GT_License WHERE SerialNumber = '{#CITRIX_LIC}'"]
NO_DISCOVER{#CITRIX_LIC}$.SerialNumber{$CITRIX_LIC.EXPIRY.CRITICAL}691200The critical threshold of time for a license to expire in seconds.{$CITRIX_LIC.EXPIRY.WARN}1209600The warning threshold of time for a license to expire in seconds.