Skip to main content

Agent configuration file

The agent configuration file is an XML file named snowagent.config. It contains settings telling the Snow Inventory Agents for Windows, macOS, Linux, and Unix what to inventory, when to inventory, and where to send the inventory result. The file is included in the agent installation package. The default location after installation is in the agent installation directory.

The agent configuration file contains the following elements:

<Configuration>
    <Agent>...</Agent>
    <Schedule>...</Schedule>
    <Meter>...</Meter>
    <Software>...</Software>
    <Registry>...</Registry>
    <Logging>...</Logging>
    <Server>...</Server>
    <DropLocation>...</DropLocation>
    <Oracle>...</Oracle>
    <SystemSettings>...</SystemSettings>
    <Environment>...</Environment>
    <SudoCommands>...</SudoCommands>
</Configuration>

Each element contains settings related to a specific area. Each element is described below, and some settings are described in more detail.

  • For a complete list of all settings, see configuration-doc.html.

  • To ensure the correct functioning of the agent, the syntax of the agent configuration file must be correct. Only edit the file if you have adequate knowledge of the file and its content.

  • All elements in the agent configuration file are case-sensitive.

<Agent>

The Agent element contains two tags: SiteName and ConfigName.

Example 1.
<Agent>
    <SiteName>StockholmOffice-Finance</SiteName>
    <ConfigName>LinuxServer-Oracle</ConfigName>
</Agent>


Use SiteName to specify a location or department.

Use ConfigName to identify a unique agent configuration. You will probably need to create more than just one agent package depending on the type of computer the agent will be installed on.

As a Snow Atlas customer, these two tags mainly act as labels that can help you group computers in SAM Core, as these tags are available in many of the reports.

As a Snow License Manager customer, these values serve a more direct purpose, as you can manage and update your agents from the Snow Inventory Admin Console based on the agent's site name and configuration name.

<Schedule>

The Schedule element is only applicable to the Windows agent. It tells the agent when to perform the scan routine. For the other agents, the scan schedule is configured outside of the configuration file.

The element is required for the agent to perform automatic scans. The element can be omitted, for example, for troubleshooting purposes or when zero-footprint inventory is used.

Example 2.
<Schedule>
    <Task>
        <Action>scan</Action>
        <Occurance>
            <AtStart>true</AtStart>
            <Daily>true</Daily>
        </Occurance>
        <TimeOfDay>09:00</TimeOfDay>
        <Randomize>60</Randomize>
    </Task>
</Schedule>


Use the Task/Occurance element to configure the agent to run the scan either daily, weekly, or monthly. If you want the agent to perform a scan every time the agent service is started, set AtStart to true.

You can specify the time of day for when the daily, weekly, or monthly scan will start in Task/TimeOfDay.

To make sure that not all agents scan and send their results at the same time, with the risk of choking the endpoint with too many simultaneous files, you can specify a randomization interval in minutes in Task/Randomize. A random number of minutes within the specified interval will then be added to the time specified in Task/TimeOfDay. In the example above, the agent will scan and send the data sometime between 9 and 10 in the morning.

<Meter>

The Meter element is only applicable to the Windows agent. You can use it to configure the rules for desktop application metering, such as when the metering should occur and any desktop applications that should be excluded from metering. See Metering of desktop application usage for more information on the desktop application metering function for the Windows agent.

Example 3.
<Meter>
    <Exclude>
        <Path>%windir%\*</Path>
    </Exclude>
    <Span>
        <StartTime>PT00H00M</StartTime>
        <EndTime>PT23H59M</EndTime>
    </Span>
    <Occurance>
        <Weekday>monday</Weekday>
        <Weekday>tuesday</Weekday>
        <Weekday>wednesday</Weekday>
        <Weekday>thursday</Weekday>
        <Weekday>friday</Weekday>
        <Weekday>saturday</Weekday>
        <Weekday>sunday</Weekday>
    </Occurance>
</Meter>


Specify paths for any software you want to exclude from metering in Exclude. You can use '*' as a wildcard. For example, <Path>C:\Windows\*</Path> will exclude all software that is run from the C:\Windows directory. For a complete description of the string matching rules, see Rules for exclude paths.

Specify the start and end time of day for the metering in Span.

Specify one or more days of the week on which you want the metering to occur in Occurance.

<Software>

Use the Software element to specify the file locations that the agent will scan and the file types that the agent should include in the scan result. Based on the contents of the element, the agent creates a ruleset determining what parts of the file system to include in the scan. See Rules for file system scan for a description of how the ruleset is created.

Note

In addition to the paths specified in Software/Include and Software/Exclude in the configuration file, there are other criteria affecting the selection of files to include in the scan. The criteria are described in the user guide for the respective agent.

<Registry>

The Registry element is only applicable to the Windows agent. You can use it if you want the agent to include additional information from the Windows Registry in the scan result.

Example 4.
<Registry>
  <Query>
     <Key>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT</Key>
     <Value>Version</Value>
  </Query>
</Registry>


<Logging>

The Logging element tells the agent what to log and how large the log files are allowed to become before a new file is created and older log files are deleted.

Example 5.
<Logging>
    <MaxSize>1024</MaxSize>
    <!-- error, warning, info, trace, verbose -->
    <Level>error</Level>
</Logging>


The max size is specified in kilobytes.

Log levels range from “error”, where only error messages are logged, to “verbose”, where the agent is writing more or less everything it does throughout the day. "verbose" can be used when troubleshooting an agent installation. Each log level includes the preceding log level, for example, "info" includes "warning" and "error".

<Server>

The Server element tells the agent which endpoints to send the .snowpack files to.

Example 6.
<Server>
    <Endpoint>
        <Address>https://endpointserver:8080</Address>
        <Proxy>
            <Server>http://proxyserver:80</Server>
        </Proxy>
        <ClientCertificate>
            <FileName>name</FileName>
            <Password>pwd</Password>
        </ClientCertificate>
    </Endpoint>
</Server>


Endpoint/Address is the only mandatory tag. It should hold the URL to either a Snow Extender, a Service Gateway, or a Master Server, depending on the server technology you have installed. You can specify several endpoint addresses by adding several Endpoint elements. In that case, the agent will randomly select an address and attempt to make a connection. As soon as it has successfully managed to negotiate a connection it will use that one for the remainder of the session. Note that the more server endpoints defined in the agent configuration, the longer it will take to negotiate a connection. This is typically not an issue but when writing scripts, keep in mind that it may introduce a significant delay since the agent has to timeout on a bad server endpoint configuration before it can try the next one.

You can also add information about proxy servers and client certificates.

<DropLocation>

Use the DropLocation element if you want to send a copy of each created .snowpack file to an additional location. The location can be a network folder, an HTTP endpoint, or a UNC file path. If more than one drop location is configured, all drop locations will receive a copy.

Example 7.
<DropLocation>
    <Path>c:\temp\SnowPackOutput</Path>
</DropLocation>


Note that if the agent cannot reach a drop location during the send activity, it will not try to resend the file later.

<Oracle>

The Oracle element is used together with the Snow Inventory Oracle scanner, an optional script that will log in to a locally installed Oracle database and retrieve information about the database users, management packs, and options. The scanner can be included in the agents for Linux, Unix, and Windows.

Example 8.
<Oracle enabled="true">
    <Include>
        <AllInstances>true</AllInstances>
    </Include>
</Oracle>


When the enabled setting is set to "true", the agent will run the Snow Inventory Oracle scanner as part of the scanning process, and automatically perform an inventory of all Oracle database instances found.

Oracle/Include specifies which database instances should be scanned. It is preconfigured to scan all instances.

<SystemSettings>

The SystemSettings element contains various settings changing the behavior of the agent in different ways. More than 70 settings can be added to the element. Some examples:

Setting key="env.is_virtual_desktop_infrastructure": If you install agents in a VDI environment, you will need to include this setting for the computers to be inventoried as VDI devices, which is important to license your VDI environment correctly.

Setting key="env.java_home": If you are running the Snow Inventory Oracle scanner to inventory your Oracle databases, you might need this system setting to locate the Java installation path. As the Oracle scanner is a Java application, it needs access to a Java runtime. Sometimes the Java runtime path is added to the system variables, and in those cases, this path can be omitted from the agent configuration file. But in cases when the Java path is unknown to the system, you can specify it here.

Cloud application metering

The "saas.[browser].enabled" settings are used to enable or disable the cloud application metering feature on the agent side.

The settings can have the following values:

  • false - disables the cloud application metering feature on the agent side.

  • true - enables the cloud application metering feature on the agent side.

  • enable - enables the browser extension to be installed outside the agent, for example via a management tool. It also prevents the agent from uninstalling the extension when it has been installed outside the agent.

The tables below show how the agents handle the extensions depending on the configuration.

Table 1. Snow Inventory Agent for Windows

At agent startup

At agent shutdown

false

Complete uninstall

Complete uninstall

enable

Enable extension, but don't install it

Disable extension, but don't uninstall it

true

Enable/install extension

Complete uninstall



Table 2. Snow Inventory Agent for macOS

Webmetering rules files present in agent installation folder

No webmetering rules files in agent installation folder

false

Complete uninstall

Complete uninstall

enable

Write nativehost and manifest

Remove nativehost and manifest

true

Install extension and write nativehost and manifest

Complete uninstall



For a complete description of the cloud application metering solution, see Cloud application metering.

<Environment>

Use the Environment element to specify any variables the agent should not gather from the environment.

Example 9.
<Environment>
  <Ignore>USERNAME</Ignore>
</Environment>


<SudoCommands>

Use the SudoCommands element if you want to enable the Unix agent to run a complete scan without being run as a super-user, see Run the agent according to the principle of least privileges.

The element is only applicable to the Unix agent.

Example 10.
<SudoCommands>
  <Path>/usr/bin/file</Path>
  <Path>/usr/bin/ls</Path>
</SudoCommands>