Mac Inventory Analyzer

The Mac Inventory Analyzer is an audit agent designed to collect inventory data on the computers running Mac OS (for details on the supported operating systems, see Installation Guide: Supported Audit Clients). The Mac Inventory Analyzer (code name ina_mac) 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 the specified location or sent via e-mail to the specified address.

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

Alloy Discovery offers three audit methods based on using standalone Mac 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 Mac Inventory Analyzer package includes the following files and folders:

  • ina_mac - the Mac Inventory Analyzer executable.

  • ina_mac.ini - the Mac Inventory Analyzer configuration file.

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

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

Alloy Discovery installation includes the README-ina_mac.txt file (typically, it is located in C:\Program Files\Common Files\Alloy Shared\InaMac\Bin), which provides additional information on setting up and configuring Mac Inventory Analyzer.

The Mac 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 Mac Inventory Analyzer may also generate additional files that can be used by the technical support.

Mac Inventory Analyzer configuration file

The ina_mac.ini configuration file contains the parameters governing the Mac Inventory Analyzer's operation. 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

out-dir=./AuditData

smtp-server=smtp.example.com

smtp-port=25

username=jdoe

password=verysecret

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 Mac 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 Mac machine.

There are several ways to send audit snapshots from the remote Mac 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 "./ina_mac -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 ina_mac.ini resides in the same folder as the Mac Inventory Analyzer executable (ina_mac), since it contains the necessary configuration settings for ina_mac. The user is allowed to change these settings, if needed. For instructions, please see the README-ina_mac.txt file shipped with Alloy Discovery (\Program Files\Common Files\Alloy Shared\InaMac\Bin).

Running the Mac Inventory Analyzer

There are several ways to launch the Mac Inventory Analyzer:

  • Launch the Mac Inventory Analyzer from the command line without command-line switches. The Analyzer will use the configuration settings from the ina_mac.ini file.

  • Launch the Mac Inventory Analyzer from the command line using command-line switches explained in README-ina_mac.txt. The parameters you enter on the command line will override the ina_mac.ini configuration file settings.

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

Automating Audit on Client Machines running Mac

You can create a schedule to run Mac Inventory Analyzer automatically, for example, using the cron daemon. For details on scheduling tasks using crontab, see the crontab(1) and crontab(5) man pages.

On machines running Mac OS X 10.4 and later it's recommended to use the launchd daemon, a new advanced system process manager. For example, you could create the following property list for launchd:

<?xmlversion="1.0" encoding="UTF-8"?>

<!DOCTYPEplist PUBLIC "-//AppleComputer//DTD PLIST 1.0//EN"

"http://www.apple.com/DTDs/PropertyList-1.0.dtd">

<plistversion="1.0">

<dict>

<key>Label</key>

<string>ina_mac daily</string>

<key>ProgramArguments</key>

<array>

<string>/usr/local/bin/ina_mac</string>

<string>-m</string>

<string>collector@example.com</string>

</array>

<key>LowPriorityIO</key>

<true/>

<key>Nice</key>

<integer>1</integer>

<key>UserName</key>

<string>root</string>

<key>StartCalendarInterval</key>

<dict>

<key>Hour</key>

<integer>11</integer>

<key>Minute</key>

<integer>30</integer>

</dict>

</dict>

</plist>

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

For details on scheduling tasks using launchd, see the launchd(8), launchd.plist(5), and launchctl(1) man pages.