Linux Inventory Analyzer

The Linux Inventory Analyzer is an audit agent designed to collect inventory data on the computers running Linux OS (for details on the supported operating systems, see Installation Guide: Supported Audit Clients). The standalone Linux Inventory Analyzer (code name lina) is deployed onto the client side running the audit outside of Alloy Discovery. The collected inventory data is stored in the audit snapshots that will be saved in a specified location or sent to a specified e-mail address.

NOTE: The Linux Inventory Analyzer produces snapshots in the same format as the Inventory Analyzer for Windows.

Alloy Discovery offers three audit methods, based on using standalone Linux audit agent: the Network Folder Audit, the E-mail Audit, and the Portable Audit. Those methods involve deployment of the Inventory Analyzer package to a target location (a network share or a flash drive) and running the audit from that deployment location.

The Linux Inventory Analyzer package includes the following files and folders:

  • lina24 - the Linux Inventory Analyzer executable for Linux kernel version 2.4 and earlier.

  • lina26 - the Linux Inventory Analyzer executable for Linux kernel version 2.6 and later.

  • lina - the script to launch the proper Linux Inventory Analyzer executable.

  • lina.ini - the Linux Inventory Analyzer configuration file.

  • README-lina.txt - the Readme file providing information on how to configure Linux Inventory Analyzer, this file is included in the inventory package of E-mail Audit and Portable Audit only.

  • AuditData - the folder where the resulting audit snapshots will be placed.

The Linux Inventory Analyzer produces the following output files:

  • .adt - binary files containing up-to-the-minute hardware and software inventory details of the audited computers;

  • .log (optional) - text files containing status details of the audit operations.

When configured, the Linux Inventory Analyzer may also generate additional files that can be used by the technical support.

Linux Inventory Analyzer configuration file

The lina.ini configuration file contains the parameters governing the Linux Inventory Analyzer's operation. Generally, the configuration file may contain zero or more of the following lines in any order. This file is optional and defined only if you change the default parameters. Note that the values are for illustrative purposes only:

mail=collector@example.com

mail-from=sender@example.com

username=jdoe

password=verysecret

smtp-server=smtp.example.com

smtp-port=25

out-dir=./AuditData

SoftwareRegistryScanEnabled=yes

SMBIOSFilter0=TEST

SMBIOSFilter1=No Info*

NOTE: Both plain text and encrypted passwords are allowed. You can enhance security by creating the configuration file from within Alloy Discovery; in this case, the password will be stored encrypted.

If you want to send audit snapshots from remote Linux machines by e-mail, you have to have an access to a SMTP server (for details, see Configuring outgoing e-mail), or to install a sendmail-compatible Mail Transfer Agent on every Linux machine.

There are several ways to send audit snapshots from the remote Linux machines:

  • Send the snapshots via SMTP server. To use this option, create a Site with the E-mail Audit Source in Alloy Discovery (for details, see Creating Sites). Make sure all the SMTP-related parameters are specified (-sp, -ss and -p with -u if your SMTP server requires authentication).

  • Send the snapshots using a Mail Transfer Agent (MTA). To use this option, execute "./lina -m collector@example.com" (make sure to replace an example e-mail address of the recipient with the real one) from the command line. The snapshots will be sent directly to the specified e-mail address via the sendmail-compatible MTA installed locally.

It's very important that lina.ini resides in the same folder as the Linux Inventory Analyzer executable (lina), since it contains the necessary configuration settings for lina. The user is allowed to change these settings, if needed. For instructions, please see the >README-lina.txt file shipped with Alloy Discovery (\Program Files\Common Files\Alloy Shared\Lina\Bin).

Running the Linux Inventory Analyzer

Regardless on your Linux kernel version, use lina to launch Linux Inventory Analyzer, and the script will launch the proper executable. There are several ways to launch the Linux Inventory Analyzer:

  • Launch the Linux Inventory Analyzer from the command line without command-line switches. This way, the Linux Inventory Analyzer will use the configuration settings from the lina.ini configuration file, if the file was created.

  • Launch the Linux Inventory Analyzer from the command line using command-line switches. If you run the Linux Inventory Analyzer using the switches explained in >README-lina.txt, the parameters you enter on the command line will override the lina.ini file settings.

  • Create a schedule to run the Linux Inventory Analyzer automatically.

Automating Audit on Client Machines running Linux

You can create a schedule to run Linux Inventory Analyzer automatically. One of the ways to automate the task is to use the cron daemon. The cron program is used to schedule various cron jobs such as running some programs overnight.

For example, you could add the following line to the crontab schedule:

5 0 * * * /usr/local/bin/lina -m collector@example.com

As a result, Linux Inventory Analyzer, which script resides in /usr/local/bin, will audit the computer daily at 00:05 AM and will send the generated audit snapshot files via e-mail to collector@example.com.

For details on scheduling tasks using crontab, see the crontab(1) and crontab(5) man pages.

Running Lina From a Windows Share

In many cases it may be easier to run the Linux Inventory Analyzer directly from a Windows share to avoid moving audit snapshots to a central network location and managing Linux Inventory Analyzer versions from a decentralized location. You can view the >README-lina.txt file for a sample script that will connect to a Windows file share using Samba, run the Linux Inventory Analyzer, and automatically save the .adt file in the proper location.