Alert specifications for a licence code
The system administrator can optionally invoke alerts using a script or an email in these scenarios:
- Soft limit exceeded
- Hard limit reached (the maximum number of licences allowed)
- Licence issued
- Licence returned
- Licence denied (occurs on the next request after the hard limit has been reached)
- Licence time-out
- Licence expiration date reached
By default, the licence server will look for the license-file.cnf (appends extension .cnf to the license file path it uses) in the licence server local directory.
TIP: Alternatively the environment variable LSERVRCCNF or the -e option.location of the configuration file can also provide the location.
- To enable alerts, the configuration file should contain reference to the features (available in the licence server) for which alerts need to be generated.
- Configuration information can be readable licence remap statements, alert action statements, etc.
- The licence server is the only entity that deals with alerts. The configuration file is read by the licence server. If the configuration file does not exist, no alerts are reported.
- The file can contain information on what to do with the alerts. If the configuration file is changed while the licence server is running, restart the licence server for the changes to take effect.
- The configuration file lservrc.cnf is a general-purpose configuration file. The environment variable LSERVRCCNF can specify the path to the configuration file.
- The path for <LicenseFile>.cnf is constructed from the licence file path the user is using.
- LicenseFile can be specified using existing methods such as the licence server startup -s option, or the LSERVRC environment variable. No errors will be created if the configuration file is missing.
The configuration file is broken into sections headed by feature and version:
. . .
. . .
. . .
Email alerts are available on both Windows and UNIX computers but are configured differently for each.
Configuring Email Alerts for Windows
On Windows computers, the licence server calls the lsmail utility to send email alerts using SMTP.
- Setup the alert information section of the licence server configuration file and use the EMAIL statement to enable email alerts.
- The file lsmail.exe should be in the directory in which the licence server resides.
- Run lsmail.exe. The first time it is run, it will ask for the SMTP server address (the mail server). The default port number used is 25 and the sender name is Sentinel RMS License Manager.
Note: An anti-virus program may block the SMTP port and alert generation via email will fail. Ensure SMTP is unblocked on the licence server host.
lsmail will automatically be called by the licence server to send email when the alert action specified in the licence server configuration file occurs.
To run lsmail manually:
Email address of the person who will receive the alert message.
Text of the alert message.
Subject (if your email program accepts a subject argument).
To test lsmail, at the DOS prompt type (specifying your email address) say:
lsmail -t "firstname.lastname@example.org" -m "This is a test" -s "Test"
Configuring Email Alerts for UNIX
The mail sending program to use can be customized via the MAILPGM environment variable. If MAILPGM is not set, the first program found from the following locations will be used. Search the path in the licence server’s start-up environment (PATH environment variable). Any command/shell aliases will be ignored.
If no program is found via search or MAILPGM, the email mechanism will be off. The mail program will be invoked in a manner equivalent to:
MAILPGM email-recipient-list text-of-alert-message
No subject is provided.
If your mail program accepts a subject via the -s option, you could use:
MAILPGM= /usr/ucb/mail -s "Alert message” to receive a subject for outgoing alert email.
The configuration file is read once per feature and version on the first addition of that feature (not necessarily at the licence server start time), and the statements for that feature and version are cached. If you change the entries applicable to a feature, you should restart the licence server.
Sample Configuration File
An example configuration file is shown below:
#Licences for SIS Desktop (any version)
softlimit = SCRIPT OFF EMAIL OFF # Alert action statement
Hardlimit = SCRIPT OFF EMAIL OFF
appstart = SCRIPT OFF EMAIL ON
appstop = SCRIPT OFF EMAIL ON
denied = SCRIPT OFF EMAIL OFF
Email = GisManager@mysite.com
#All other features
softlimit = SCRIPT OFF EMAIL ON # Alert action statement
hardlimit = SCRIPT On EMAIL On
denied = Script on Email ON
apptimeout = script on Email off
expired = SCRIPT on email on
EMAIL = GisManager@mysite.com
SCRIPT = /RMS/Scripts/warningscr
One section of the file can specify only a single alert script and a single email address. For all alerts enabled in one section, the same alert script will be invoked.