(SM) Support Tip: Login License Notification
To prevent the situation where no one can login to Service Manager due to the consumption of all of the login license we can send an Email notification to the admin when the available license drops below a specified critical limit.
This can be accomplished with a schedule, notification, scmessage and ScriptLibrary records contained in the attached unload file.
The schedule record “Login License Notification” runs in the alert class with an expiration of 15 minutes. It calls the ScriptLibrary function “LoginLicenseNotification”. You can alter the class and expiration interval to meet your needs.
The notification record “Login License Notification” generates the email based on the scmessage record with a class of “custom” and a Message Number of ‘2’. The supplied records send the notification to email@example.com. You will need to alter this.
The scmessage record:
The ScriptLibrary “LoginLicenseNotification” makes use of the RAD function sysinfo.get to obtain the login license information. The critical limit is set to 25. For example on a system that is licensed for 200 Floating users the notification would be triggered when the 175th user logged in.
In the script you can adjust the limit here:
// SET YOUR LIMIT HERE
var nCriticalRemainingLogins = 25;
The generated email would appear as:
Warning number of available Floating login license is less than 25, Current:177 License Limit:200