detlev.eufinger2

How to use the new feature “Snow Dynamic Inventory” - Part One

Blog Post created by detlev.eufinger2 Employee on Jun 28, 2019

Background

You want to collect additional data that can’t be collected using the standard scanning capabilities of the Snow agent.

 

Previous Solution:

With Snow Inventory version 3 and version 5, Snow offered the possibility in the Windows client/agent to run PowerShell scripts to capture additional data.

These scripts were executed exclusively by our agent or client. Platforms like Linux, Unix or MAC were not covered by this PowerShell solution.

 

New Solution:

However, Snow Inventory 6 enables additional data to be captured independently of the platform it is executed from. This new capability is called “Snow Dynamic Inventory”

How does it work?

Since this new functionality is only available on Snow Inventory Version 6 and higher, you’ll need to upgrade to this version to unlock the potential. Besides that, you also need Snow Agent version 6 running on each of the platforms in your IT estate.

 

Step 1

Create your own script to capture your specific data. The script language does not matter; use the scripting language you know best.

Guidelines for your own scripts:

  • The script name cannot be longer than 100 characters.
  • No space in the filename.
  • The Script itself can be placed anywhere

 

Naming Examples:

Scan-FilevaultEnabled.sh

Scan-BitLockerStatus.ps1

Scan-Whatever.bat

  • The data that you want to collect has to be in valid json format and Base64 encoded.
  • Output the result to the designated output folders with the script name as the destination

 

 

 

Output pathOS

/var/tmp/SnowSoftware/Inventory/Agent/script-output/ + ScriptName/

Unix

/Users/Shared/SnowSoftware/Inventory/Agent/script-output/ + ScriptName/

MacOS

%ProgramData%\SnowSoftware\Inventory\Agent\script-output\ + ScriptName\

Windows

/var/run/SnowSoftware/Inventory/Agent/script-output/ + ScriptName/

Linux

 

 

Step 2

Create and maintain a log file in the output folder named ScriptName.log

This handles the lifecycle of the logfile, i.e. deletion and/or overwrites.

Step 3

Create a metadata file along with the script output called metadata.json

 

The following tags must be included

 

Name
ScriptNameused by the server to separate json blobs in the database table
ScriptRunUTCTimeStamptime in UTC when the script run
DaysToRetainused by the server to determine how many days the data should be kept in the database before getting cleaned out by the Garbage Collector

 

The Server will be parsing this information and use it when storing the data in the database.

 

Example of metadata.json file

 

 

Step 4

Schedule your own script to run!

Note:

Step 1 – Step 3 is included in the main script.

All output data is base64 encrypted

After running your default snow Agent scan, all output files are collected and deleted.

 

You can find your collected data in the inventory Database:

 

 

Example for Shell Script:

Outcomes