Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.6 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

Import ESX host into OCS

I have successfully used the fusion-ESX to create the OCS file for an ESX server.

Using the injector tool to import into OCS, the status is successful, but no host is created in OCS.
in OCS Inventory NG server for Unix by (260 points)

5 Answers

0 votes
Hi,

Have you got errors in apache error.log and/or ocsinventory-injector.log files? Post both contents

Regards

Frank
by (78.6k points)
0 votes
Here is the output from a new server that i created from scratch:

[root@ocs-test binutils]# ./ocsinventory-injector.pl  -f esx55.test.com-2015-08-03-00-27-27.ocs -u http://ocs-test.jacobs.com/ocsinventory -v
Loading esx55.test.com-2015-08-03-00-27-27.ocs...ERROR: 500 Internal Server Error

[root@ocs-test binutils]# tail -f /var/log/ocsinventory-server/activity.log
Sat Jun 11 11:27:12 2016;23650;114;esx55.test.com-2015-08-03-00-27-27;10.64.0.154;OCS-NG_INJECTOR_PL_v3;inventory;no_session
Sat Jun 11 11:29:45 2016;23675;114;esx55.test.com-2015-08-03-00-27-27;10.64.0.154;OCS-NG_INJECTOR_PL_v3;inventory;no_session

tail -f /var/log/httpd/access_log

10.64.0.154 - - [11/Jun/2016:11:29:45 -0700] "POST /ocsinventory HTTP/1.1" 500 527 "-" "OCS-NG_INJECTOR_PL_v3"

Thank you!
by (260 points)
0 votes
And errors in the httpd error log:

[Sat Jun 11 11:29:02.658321 2016] [:error] [pid 23667] [client 172.20.11.96:58842] PHP Warning:  mysqli_connect(): Headers and client library minor version mismatch. Headers:50544 Library:100025 in /usr/share/ocsinventory-reports/ocsreports/backend/require/connexion.php on line 10, referer: http://ocs-test.jacobs.com/ocsreports/index.php?function=visu_computers
by (260 points)
+1 vote
Anyone have this issue?
by (260 points)
Yes. You are using fusioninventory like me. The Fusioninventory-Injector output lacks a checksum

which is required within ocs. To fix this the locate FusionInventory/Agent/Task/ESX.pm, open it search for

sub createInventory, go down like 12 lines and paste this:

$inventory->computeChecksum();

Close and run. This should fix it.
Im having some issues was wondering where you put you entry?

sub createInventory {
    my ( $self, $id, $tag ) = @_;

    die unless $self->{vpbs};

    my $vpbs = $self->{vpbs};

    my $host;
    $host = $vpbs->getHostFullInfo($id);

    my $inventory = FusionInventory::Agent::Inventory->new(
        logger => $self->{logger},
        tag    => $tag
    );
    $inventory->{deviceid} = $self->createFakeDeviceid($host);

    $inventory->{isInitialised} = 1;
    $inventory->{h}{CONTENT}{HARDWARE}{ARCHNAME} = ['remote'];
0 votes
@pl2303 Thanks!
by (310 points)
 
Powered by Question2Answer
...