From Edgar BV Wiki
Jump to: navigation, search

OCS inventory is a system that polls information about servers and PCs through an agent.

Installing the server / reporting

apt-get install ocsinventory-reports ocsinventory-server

then go to http://monitor.edgarbv.int/ocsreports

finish the questions and it's up and running. It will have no info in it.


getting ipdiscover to work

You need a network ID. In order to link a subnet to a network ID, you need to go to Networks -> Administer. There you can add a network (btw you may find there allready is an unknown network in Networks -> IpDiscover, then you can edit that). The ID field will be empty as well as the drop down. When you press the + you are taken to a new page with 2 tabs: Data available and New data. In the New Data tab you can enter information under Caption. After OK, this will be available in the drop down box for network ID.

Installing the agents

apt-get install ocsinventory-agent

during this proces it will ask for local / http (http if connected) and the server name (monitor.edgarbv.int / if it doesn't resolve that). You can change that in /etc/ocsinventory/ocsinventory-agent.cfg

next run


and after it's done, you should see it in the reporting server.

Give it a relevant tag.

you can find the server URI to send to in config -> config -> tab Interface

Polling ESXi hosts

you need fusioninventory-agent-task-esx package.

Before running the script,

cd /usr/share/fusioninventory/lib

Or it will give you a perl error then:

fusioninventory-esx --host hostname --user root --password foo --directory /tmp

Creates the .ocs file in /tmp/

You then need to inject it into OCSInventory, which can also be done from the server:

fusioninventory-injector -v -f /tmp/*.ocs --url http://user:pw@monitor.edgarbv.int:80/ocsinventory

This may not work if you're polling a later version of ESXi though, because it only supports up to 5.0 http://www.fusioninventory.org/documentation/references/agent-task-esx/2.x/fusioninventory-esx/

should you decide to install by hand

apt-get install libio-compress-perl php-soap libarchive-zip-perl

download the zips from github.

mv OCSInventory-ocsreports-master/ OCSInventory-Server-master/ocsreports

Then run the setup.sh

Make sure you edit the conf files (/etc/apache2/conf-enabled/z-ocsinventory-server.conf / /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.phh) for the db connections and delete the install files.

If you get weird perl errors in apache error.log / 503 errors (perl Can't call method "do" on an undefined value), then the server db connection is broken.

old stuff

run the setup.sh from the unzipped archive (which may not be zipped, but only tarred, despite being called .tar.gz). This will also set up the ocsreports file for among many other perl libraries. I never managed to get the server to install the Apache2::SOAP or SOAP::Transport::HTTP (which is supposed to be part of SOAP-Lite) library properly.

When you install the ocsinventory-agent on linux you can see in the logfile if the connection to the server is going well.

send the agent to server=serverip/ocsinventory

you look up life in http://serverip/ocsreports


tag=Laptop TJ-VII