Automation License Manager (ALM)
Introduction
Open iT supports ALM usage reporting by collecting log files and converting them to Open iT format.
An Open iT Core Client is installed on your license server, and the license server does not create license usage history logs for this collection. The data collector initiates the raw data collector to request license usage history logs from the license manager every 5 minutes, triggering the data collection process. Once the logs are received, the raw data collector passes them to the data collector. The collected data is then sent to a data preprocessor for processing. After preprocessing, the final preprocessed data is sent and stored in the Core Server.
This will produce the following aggregated data types used for historical reporting:
Record Log Data:
- (89) Total License Use Licenseevents
- (90) Individual License Use Licenseevents
- (91) Usergroup License Use Licenseevents
- (108) Host License Use Licenseevents
- (109) Hostgroup License Use Licenseevents
Event Log Data:
The following sections will guide you in setting up the necessary configuration to collect and send the required data to the server.
Apply the configurations shown in the Open iT Core Client.
Requirements
- An Open iT Core Client connected to an Open iT Core Server or a coexistent Open iT Core setup
- License server administrative rights
- Full path to the debug log file
Activating Log Data Collection
These are the required steps to activate collection of ALM log data.
-
Open a command prompt with Administrator level privileges.
-
Go to the bin directory, which is by default in
C:\Program Files\OpeniT\Core\bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd C:\Program Files\OpeniT\Core\bin
-
Once in the directory, activate the collection of ALM log data, run the command:
Command Syntaxopenit_oconfinit -u "collect_license_alm-logs.root.scheduler.jobs.collect_alm_raw_licenselogs.general.active=true"
-
Set the path to the database produced by ALM, run the command:
Command Syntaxopenit_oconfinit -u "collect_license_alm-logs.root.scheduler.jobs.collect_alm_raw_licenselogs.operations.arguments=automationlm --databasefile \"<database_file>\" --outputfile \"${OpeniT.directories.temp}/SqlCeUtil/ALM/automationlm.csv\" --logdir \"${OpeniT.directories.log}\""
where
<database_file>
is the path to the database produced by ALM. This is usually inC:\ProgramData\Siemens\Automation\Automation License Manager\logging
.Exampleopenit_oconfinit -u "collect_license_alm-logs.root.scheduler.jobs.collect_alm_raw_licenselogs.operations.arguments=automationlm --databasefile \"C:\ProgramData\Siemens\Automation\Automation License Manager\logging\almdb.sdf\" --outputfile \"${OpeniT.directories.temp}/SqlCeUtil/ALM/automationlm.csv\" --logdir \"${OpeniT.directories.log}\""
Advanced Configuration
The collection runs every 5 minutes by default, which triggers the data collection process. To configure the intervals, locate the instances
attribute under collect_alm_raw__licenselogs
, collect_alm_licenselogs
, preprocess_alm_licenselogs-events
, preprocess_alm_licenselogs-records
, or transfer_alm_licenselogs
in the same file and configure the attributes.
Refer to the ALM Log Job Scheduler Instances Configuration table to learn the attributes used to configure ALM data collection and transfer.
Attribute Name | Accepted Value | Description |
---|---|---|
max-instances | Uint (e.g., 5 , 8 , 9 ) | The number of instances allowed to run the at the same time. |
max-handling | String (end-oldest , end-all-old , or end-new ) | The action done upon reaching the maximum number of instances:
|
end-timeout | Timespan (e.g., P30S , P5M , P1H ) | The maximum waiting time before terminating a running instance. |
quarantine | Timespan (e.g., P30S , P5M , P1H ) | The waiting time before starting a new instance after a previous one. |
Configuring Log File Collection
The ALM log file configuration file, logfilecollector-alm.xml
, is found in the Components directory, which is by default in C:\Program Files\OpeniT\Core\Configuration\Components
. You don't need to update this, but if you want to learn more about its behavior, refer to the ALM Log Parser Configuration table.
Object Name | Accepted Value | Description |
---|---|---|
source.dir | DirName (i.e., ${OpeniT.directories.temp}/SqlCeUtil/ALM/ ) | Location of the ALM log files. |
source.pattern | String (i.e., *.csv ) | The glob pattern identifying source files in the source directory. |
source.seen | String (collect , ignore , or tail ) | Seen files are the previously collected source files.
|
source.cmplines | Integer (e.g., 6 , 10 , 20 ) | This is required if the value of source.seen is tail . This is the number of lines compared to source files collected before to determine where to start the collection. Note: If this number is too low, you can end up with an incorrect position, and duplicate data may be in the log files. Usually, it is better to have a few lines more than strictly necessary than even a single line too little.* |
target.dir | DirName (i.e., ${OpeniT.directories.temp}/LogFileCollector ) | This is the location of the directory containing the collected log data. |
target.module | String (i.e., license ) | The target type of module (in general). |
target.datatype | String (i.e., alm ) | The specific type of target data. |
target.interval | Timespan (e.g., P30S , P5M , P1D ) | The span of time between collector runs. |
target.rotation-size | Integer (e.g., 6 , 10 , 20 ) | The log file rotates if it goes beyond the number (in mb) defined. |
target.rotation-glob | String (e.g., * ) | The glob pattern to match before the log file rotates. |
Deactivating Record Log Data Collection
Turning on log data collection automatically aggregates record and event log data. If you want to collect event log data only, follow these steps.
-
Open a command prompt with Administrator level privileges.
-
Go to the bin directory, which is by default in
C:\Program Files\OpeniT\Core\bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd C:\Program Files\OpeniT\Core\bin
-
Once in the directory, deactivate the collection of record log data, run the command:
Command Syntaxopenit_oconfinit -u "collect_license_alm-logs.root.scheduler.jobs.preprocess_alm_licenselogs-records.general.active=false"
-
Change the handling of event logs, run the command:
Command Syntaxopenit_oconfinit -u "collect_license_alm-logs.root.scheduler.jobs.preprocess_alm_licenselogs-events.operations.arguments=--srcdir \"${OpeniT.directories.temp}/LogFileCollector\" --srcpattern raw-alm-license-LogFileCollector*.data --srcfilehandling rename --trgdir \"${OpeniT.directories.temp}/LogParserALM\" --module license --datatype event --resolution PT1H --matchobjects \"${OpeniT.directories.conf}/matchobjects-event-alm.oconf\" --type event --disable-statlogging"
-
Change the data transfer schedule, run the command:
openit_oconfinit -u "collect_license_alm-logs.root.scheduler.jobs.transfer_alm_licenselogs.scheduling.start-triggers.trigger#1.job-name=preprocess_alm_licenselogs-events"
Verifying Log Data Collection
After activation, you can verify that the data is collected and sent to the Core Server by following these steps:
-
Open a command prompt with Administrator level privileges.
-
Go to bin directory, which is by default in
C:\Program Files\OpeniT\Core\bin
, run the command:Command Syntaxcd $BIN_DIR
Examplecd C:\Program Files\Openit\Core\bin
-
Run the command:
Command Syntaxopenit_executor -r collect_license_alm-logs
-
Verify that there are
archiver*.in
files created in the Core Server's archiver directory, which is by default inC:\ProgramData\OpeniT\incoming\archiver
.