This document describes how to install and run the Snow Inventory Agent for Linux. For more detail, please refer to the full user guide - SIAL510_UserGuide_LinuxAgent.pdf
The Snow Inventory Agent for Linux is part of the Snow Inventory solution and is used for inventory of Linux computers. The agent scans the computer and saves the collected data to a compressed and encrypted file, which is sent to a Snow Inventory server (Master Server or Service Gateway).
For detailed information on the configuration of the agent, refer to the document Snow Inventory Agent Configuration Guide.
This version of the Snow Inventory Agent can only be used in a Snow Inventory Server 5.x environment. Supported operating systems are found in the document System Requirements for all Snow Products found at www.snowsoftware.com/int/download. Java Runtime Environment To be able to inventory Oracle database products by using the Snow Inventory Oracle Scanner (SIOS), the target computer is required to have Java Runtime Environment 6.0 (1.6) or later installed. Due to an internal defect in Java, Java Runtime Environment 1.7.0_7 must not be used.
Please note that in the example terminal commands, anything in [brackets] is not part of the command - for example [return] means to hit the return or enter key.
The Snow Inventory Agent for Linux can be installed using prepared packages or using copies of the binary files.
Installation packages are prepared by and ordered from Snow Support. The current configuration file needs to be provided before any RPM or DEB package can be prepared. If no configuration file exists, certain information is needed in order to create one.
- Address to the Snow Inventory Server, including port number
- Site name
- Name of the configuration file
- Cron scan time (default is “daily”)
- If the Snow Inventory Oracle Scanner should be included
- If the previous versions of the Snow Inventory Client for Linux should be removed
The installation package can be copied to any folder, but preferably not the /root folder. The install command must be run from the folder where the package is located, while the uninstall command can be run from any folder.
During the installation of the agent, an application argument will be automatically added to the cron. This command looks like this: nice -n 10 /opt/snow/snowagent
Prepared RPM Package
This section describes how to install and uninstall an RPM package from a terminal session. Use sudo or run the commands as root.
Execute the rpm command with the argument -i, for example: sudo rpm -i snowagent_5.1-1_i386.rpm
To uninstall, execute a rpm command with the -e argument – you do not have to run this from within any particular folder: sudo rpm -e snowagent
Prepared DEB Package
This section describes how to install and uninstall a DEB package from a terminal session. Use sudo or run the commands as root.
Execute the dpkg command with the argument -i, for example:
sudo dpkg -i snowagent_5.1-1_i386.deb
Execute the dpkg command with the argument -P, for example: sudo dpkg -P snowagent
This section describes how to manually run a scan and then check the logs. Some light knowledge of Unix commands is advantageous but not completely necessary. Once the steps above have been followed, according to the type of Linux OS you are working on (RedHat or Debian) you can follow the below steps to complete and verify the installation.
- Verify the contents of /opt/snow by using the following commands from the terminal. Anything in [solid brackets] is an instruction or information and is not part of a command: cd /opt/snow [Return] You should now be looking at the directory the agent is installed into. Verify this with: ls [Return] This should output the contents of /opt/snow and should look something like this: /data [this is a directory] snowagent snowagent.config snowcron
- The files of the Snow Inventory Agent are one executable file called snowagent and one configuration file called snowagent.config. These two files are, by default, located in the /opt/snow directory. To see a command line summary of the executable, use the following command from a terminal window: sudo [you need this if you are not running as superuser] /opt/snow/snowagent -?
- You will notice that the one of the commands is scan. Run snowagent with the scan argument: sudo /opt/snow/snowagent scan [Return]
- You can now verify that the scan took place by looking at the /opt/snow/data folder. If you are already on the /opt/snow folder, you can simply do: cd data [Return] Or you can point to the full path: cd /opt/snow/data [Return] Use ls to list the contents of /data: ls [Return] This should list something like the following: result-000001512674563-1153644345674295837.snowpack [this is the .snowpack scan file] snowagent.lock snowagent.log [this is the log file] You can read the snowagent.log file if you wish: more snowagent.log [Return] [A successful scan will have an Info log stating that the agent has finished building snowpack]
- Before sending the data to Snow Inventory, you might want to verify your snowagent.config file. To do this, navigate back to /opt/snow either by simply using cd .. if you are in /opt/snow/data or by using cd /opt/snow. To read the snowagent.config file: more snowagent.config [Return] This will display the .config file. User the return key to read the document. You want to verify the <SiteName> and <Address> under <Endpoint> entries are correct as well as any other configuration items you may have specified when creating the agent. When you are finished reading, press Q.
- To send your generated .snowpack file, follow the same steps as in step 3, except use the send argument: sudo /opt/snow/snowagent send You can now navigate back to /opt/snow/data and use ls to list contents. The .snowpack file generated should now be gone as it has been sent to the Inventory server. Again, you can use more snowagent.log to verify that this has been sent.
To configure the scheduling, crontab is used with the argument -e. Run this at root level. You may need to run this from /root: sudo crontab -e [Return} It may ask what tool you want to use to edit the file. Usually, Nano is used, so we will use that for this example. Once the crontab has opened, the install package will have inserted the default line: 0 21 * * * nice -n 10 /opt/snow/snowagent>/dev.null 2>&1 This translates to the scan running at 21:00 – 9pm according to a 24-hour clock. You will notice that the minutes are put ahead of the hours. You must use single digits where applicable, so 5 minutes should be 5 and not 05. For example, to set the scan time to 10am, you would modify the line to read like this: 0 10 * * * nice -n 10 /opt/snow/snowagent>/dev.null 2>&1
Once the changes have been made, press CTRL-X to exit and press Y to save changes. The scheduling has now been set.