From OCS Inventory NG
Jump to: navigation, search

Administration of OCS Inventory NG.

Adminstrative Console: Point your browser to http://.your_administration_server/ocsreports and login with username “admin”, and password “admin”.

Warning: You must change the default password or better, add a new administrative user and remove the default "admin" user.

Note: All these features are only available to OCS Inventory NG administrators.

Managing OCS Inventory NG Administration server users.

Users.pngClick on the toolbar “Users” menu to display all configured OCS Inventory NG Administration server users.

EN ocsreports users home page.png

You can add new users by entering their name, password (user will be able to change it when logged in), and selecting their type. You can choose between:

  • Administrator: user has the ability to configure all parameters of the product.
  • User: user can only query the database and view results of inventory. It just has the top left Combo-box of menu toolbar to run general queries.

To delete a user, just click on red cross at the end of the corresponding line.

Managing OCS Inventory NG general options.

Access configuration settings
Click on the toolbar “Config” menu to display all general options.
Error creating thumbnail: File missing

Here is the meaning of each option:

Configuration option
AUTO_DUPLICATE_LVL Duplicate computer detection. Select which values to use in duplicate detection. If multiple values are selected, they all must match for 2 machine records to be considered duplicate.
DEPLOY Activates or disables the automatic deployment of new agents.
DOWNLOAD Activates or disables package deployment feature. Turning off DOWNLOAD stop this functionality on the server AND on the agents. With DOWNLOAD off, once agents will have contacted OCS server, they will stop current download WITHOUT cleaning packages.
DOWNLOAD_CYCLE_LATENCY Time in seconds to wait between each download cycle (cf § 8.1 How does it work?)
DOWNLOAD_FRAG_LATENCY Time in seconds to wait between each fragment download (cf § 8.1 How does it work?)
DOWNLOAD_PERIOD_LATENCY Time in seconds to wait between each download period (cf § 8.1 How does it work?)
DOWNLOAD_PERIOD_LENGTH Number of cycles per period (cf § 8.1 How does it work?)
DOWNLOAD_TIMEOUT Validity in days of a package on an agent. If the time used to download a package is over DOWNLOAD_TIMEOUT days, package will be cleaned and ERR_TIMEOUT will be sent to ocs server.
FREQUENCY Specify the frequency in days of inventories.
INVENTORY_DIFF Enable or disable differential inventory to speed up the server. With differential inventory, only changes are stored by the server, not full inventory.
INVENTORY_TRANSACTION Enable or disable database transactions on server. With transaction, an inventory is stored only if all data has been processed correctly.
IPDISCOVER Specify the number of agents that will run the IP discovery feature for each gateway (subnet). If you leave the default value of 2, this means that the Communication server will ask the 2 most active computers on each subnet to run IP discovery feature. If you set it to 0, IP discovery will be disabled.
IPDISCOVER_LATENCY Agent will pause this many seconds between each IP address scan during IP discovery. (cf § 7.2 How does it work?)
IPDISCOVER_MAX_ALIVE Maximum number of days between two inventories for an IP Discovery enabled computer to hold his status of IP discovery computer. An IP discovery enabled computer will lose his status if it has not been seen by the Communication server for more days than the number of days defined in this setting. Another computer in the same sub network will then be designated.
Configuration option
LOCAL_PORT IP port of OCS Inventory NG Communication Server.
LOCAL_SERVER IP address or DNS name of OCS Inventory NG Communication Server.
LOGLEVEL Enable or disable detailed log for Communication server. If enabled, server will write logs to file “ocsinventory-NG.log” in directory “/var/log/ocsinventory-NG” for Linux and “…\xampp\apache\logs” for Windows.
PROLOG_FREQ Controls how often the windows service agent runs. Specified in number of hours 1-24. The agent will contact the OCS server every PROLOG_FREQ hours. The agent will not send an inventory if inventory is not older than FREQUENCY days.
REGISTRY Activates or disables the registry query function (for Windows agent only).
TRACE_DELETED Activates or not tracking of deleted/renamed computers for integration with GLPI. Enable this feature only if you use integration with GLPI asset management software.
UPDATE Not used, always set to OFF.

Click “Update” button when you set all changes.

Uploading Agent for deployment through launcher “OcsLogon.exe”.

Note: This feature works only for network connected computers able to connect to the Communication server.

OCS Inventory NG is able to automatically install an agent on computers when the launcher “OcsLogon.exe” is used through a login script or GPO. The Agent’s files are downloaded from the Communication server.

You first must upload the agent package(s) into the Administration console and activate the deployment feature by setting the “DEPLOY” general option to ON (see § 6.2 Managing OCS Inventory NG general options.).

One or both of the following 2 files must be uploaded to the server:

  • “ocsagent.exe” file for Windows, to deploy the standalone Agent (not running as a Windows service). This file is included in package OCSNG_WIN32_AGENT_XX.zip.
  • “ocspackage.exe” file, created using OCS Inventory NG Packager, to deploy the Windows service version of the Agent, even if the connected user does not have Administrator privileges.

To create the “ocspackage.exe” file, run the OCS Inventory NG Packager and fill in the following informations:

  • Path to file “OcsAgentSetup.exe”, the OCS Inventory NG service Agent installer, included in the package OCSNG_WIN32_AGENT_XX.zip.
  • Path to the Certificate file, for checking the server certificate when using the package deployment feature.
  • Optionally, another file to include in the setup.
  • Command line parameters for running “OcsAgentSetup.exe” service installer. At the minimum both “/S” to run the installer in silent mode and “/SERVER:my_ocs_com_server_address” to specify “my_ocs_com_server” the address of the OCS Inventory NG Communication Server.
  • Username (account@domain for Active Directory account and domain\account for a NT4 account) and password of an Administrator account on client computers. “OcsAgentSetup.exe” will be run under this account on client computers, to allow installing service even if user connected does not have Administrator privileges.


Note: Refer to OCS Inventory NG Packager documentation for more informations on how to use Packager.

“OcsAgentSetup.exe” supports the following command line parameters (and all Agent’s parameters defined in § 4.1.5 Agent’s command line switches):

  • /S Use quiet, silent installation
  • /SERVER:IP_ADDRESS Use Communication Server address “IP_ADDRESS”
  • /PNUM:XX Use port XX instead of default HTTP port 80.
  • /NP Do not use Microsoft Internet Explorer Proxy settings
  • /DEBUG Produce a log file of OCS Inventory NG agent execution. This mode is automatically used under Windows to launch agent as a service through an entry in registry key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices.

This will create the file “ocspackage.exe” to upload into Administration console.

Agent.png Click “Agent” toolbar menu, browse your hard drive to select agent file and click “send” button.

EN ocsreports agent home page.png

Note: If you encounter error while uploading agent, refer to common errors § 11.2.3 PHP Requested content-length.

Using Registry Query feature.

OCS Inventory NG agent for Windows is able to query the registry of inventoried computers for a value of a key or for all values of a key under registry hives HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_CURRENT_CONFIG (and HKEY_DYN_DATA for Windows 9X based computers).

You have to enable this feature in the general settings “REGISTRY”.

Registry.pngYou can then define your registry query by clicking “Registry” toolbar menu.

EN ocsreports regsitry home page.png

Click “Add” button to add a new query. Enter a name for this query, for example MS Office XP if you want to retrieve MS Office XP registration number, select the registry hive (HKEY_LOCAL_MACHINE in this example), enter the registry key (SOFTWARE\Microsoft\Office\10.0\Registration\{9011040C-6000-11D3-8CFE-0050048383C9}) and the value name to query (ProductID) and validate. Put star (*) in field “Name of the key” to get all values of the key (This is useful to get all values of key “HKLM\Software\Microsoft\Windows\CurrentVersion\Run” to know which process are automatically started for example).

EN ocsreports regsitry creation.png

After that, each time a Windows client will make an inventory, it will retrieve and store all the values corresponding to these keys.

Managing duplicates computers.

OCS Inventory NG is able to detect a renamed computer, reinstalled computer…

Generally, it will handle that alone. But sometimes, it is impossible for the server to know whether two computers are the same or not, for example when it has no network adapter (no Mac address) or when the serial number was not properly set by the constructor (If you change a computer’s name, the application won’t be able to recognize it if it has no serial or no Mac address, and thus a duplicate fake computer may be created).

Doubles.pngThis page accessible by clicking “Duplicates” toolbar menu is used to solve this problem.

EN ocsreports doubles home page.png

You may choose the kind of comparison you want in the top right combo-box.

  • Redundancy summary – Shows the number of redundant computers detected with each comparison method.
  • “Hostname + Serial number”, “Hostname + Mac address”, “Mac address + Serial number” - These are the two criteria comparison methods, the more reliable. It returns all computers that have two criteria in common.
  • “Hostname only”, “Serial only”, “Mac address only” - These are the one criterion comparison methods; it only shows all computers that shares one parameter.

Once computers are shown, it’s up to you to check whether several computers are redundant or not.


After that, you only have to select (checkbox) computers that look the same, and click “merge redundant computers”: all the data from checked computers will be merged.

The administrative data of the oldest computer are kept on the merged device.

Note: When those filters are applied, some values are filtered out (For example: 'NNNNNNN' or 'xxxxxxxxxxx' for serial number).

Editing administrative information.

OCS Inventory NG allows you to store custom information for each inventoried computers. For example, you can add administrative information to specify the owner of the computer, or the location of the computer.

This administrative information is stored both on the server and on the client to avoid any loss of data.

For example, if the database is lost, all clients will come back with their administrative information.

Admininfo.pngYou can define the administrative information you want for each computer by clicking “Admininfo” toolbar menu.

EN OCS admininfo home page.png

You can add new administrative information definition by entering their name (space or special characters are not allowed) and selecting their type. You can choose type between:

  • Text.
  • Integer.
  • Real.
  • Date.

To delete an administrative information definition, just click on red cross at the end of the corresponding line. For example, we will add administrative information corresponding to the buy date of computer.

EN OCS admininfo creation.png

You can now browse all your computers to set the buy date for each.

Editing the label

If the “DEPLOY” option is activated, clients may get the “label” file. It is used to fill the popup shown on first start of a client.

This popup asks for the “TAG” value that is used to class computers (it may be, for example, a unit code, the name of one of your company’s section, a street number etc.)

Label.pngThis “label” file is generated during the server install, and may be edited by clicking “Label” toolbar menu.

EN ocsreports label home page.png

If you submit a blank label, the label file will be deleted, and no window will be displayed anymore on client’s computer.

Importing inventory for non network connected computers.

With Administration server through your web browser

For non network connected computers, you can import inventory results from a file created on the computer by the agent run in local mode (see § 3.2 We have chosen to package OCS inventory NG server for Windows as an integrated package containing all required components. As is, the 3 main components of Management server (database server, web communication server and web administration server) are installed on the same computer.). We assume that you’re able to save this file in your hard disk from your mailbox, or any other way.

Note: If Communication Server is not running on standard HTTP port 80, or on the same computer as Administration console, you must update General Options. See § 6.2 Managing OCS Inventory NG general options.

Local import.pngClick “Local import” toolbar menu, browse your hard drive to select the “.ocs” file created by agent release and click “send” button.

EN ocsreports local import home page.png

With Communication server through a Perl script

Communication server provides the ability to import inventory from a file created on the computer. This file has “.ocs” extension.

We assume that administrator can get the file from somewhere, his mailbox, a USB drive or any other place.

Go to the directory where you’ve installed Communication server, “/usr/local/ocsinventory-NG” for us, and run the script “Ocsinventory_local.pl” with path to file which contains inventory results as argument.

Note: With OCSInventory NG Server for Windows, import script “local_import.bat” is located in “INSTALLDIR\binutils” directory, where “INSTALLDIR” is the installation folder selected during server setup.

This will import inventory results into the database.

[root@l16753101aao ocsinventory-NG]# Ocsinventory_local.pl ST32491DL-2005-06-23-10-04-02.ocs
OK for ST32491DL-2005-06-23-10-04-02.ocs
Successly inventoried : 1''
Errors : 0
Figure 6 : Sample import of a single inventory results file.

If you have multiple files to import, you can put them in a directory and them launch the script “Ocsinventory_local.pl” without argument, but within the directory where resides files to import.

[root@l16753101aao home]# Ocsinventory_local.pl
OK for ST32491DL-2005-06-23-10-04-02.ocs''
Successly inventoried : 1
Errors : 0
Figure 7 : Sample of multiple inventory results files in directory home.

Using software dictionary for GLPI integration.

Software dictionary is used to categorize detected software. This feature is very useful when you use OCS Inventory NG combined with GLPI. As is, you can group software in a category and GLPI will import them with the name of category.

For example, you have many version of Microsoft Office (97, 2000, XP, 2003…), but you don’t care about version. You just want to manage total number of MS Office. You can create a category “Microsoft Office” and insert in this category all version of MS Office. In GLPI, you will only see “Microsoft Office”. Software dictionary acts as a rename or group utility for GLPI.

Dictionnary.pngClick “Dictionary” toolbar menu.

There are 3 categories by default:

  • NEW: include all new or not yet categorized software.
  • IGNORED: you can put in this category all software you don’t want to import in GLPI.
  • UNCHANGED: you can put in this category all software you don’t want to “rename” in GLPI. These software will be imported as is.
Import EN ocsreports dictionnaries new.png

You can search software with part of his name by fill in input and clicking “Search software EVERYWHERE” button.

If you manage many categories, you can search a category by fill in part of his name in input and clicking “Search category” button.

Click on a category name to display software included.

EN ocsreports dictionnaries categories.png

You can select software to move to new category (you must fill in the new category name) or to an existing category (select it in the dropdown).

If you check “Move all”, all software, even those not displayed, will be moved to the desired category, not only the selected ones.

You can select all displayed software by clicking “The page” and deselect all displayed software by clicking “Nothing”.