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.12.3 available

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

OCS agent without installing

Hi - Can we copy the ocs inventory agent package on any host, run it without installing it to send just the report to server?

I tried the below command after copying the unix agent,
#./ocsinventory-agent -s http://ocsinvserver.example.com/ocsinventory --basevardir=/var/lib/ocsinventory-agent

and got the below error

Failed to load Ocsinventory::Agent, Can't locate Ocsinventory/Agent.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 1) line 1.

BEGIN failed--compilation aborted at (eval 1) line 1.

Any help is greatly appreciable!

Thanks

you can run the agent directly for its source directory with --devlib
in OCS Inventory NG agent for Unix by (240 points)

2 Answers

0 votes
Hi,

You have the possibility to generate a standalone unified agent. In tools directory you'll find a shell script named standalone.sh. To build this an internet connection is necessary but not mandatory.

Regards

Frank
by (90.4k points)
0 votes

I tried ./standalone.sh but it failed:

[user@centos7 tools]$ ./standalone.sh
WARNINGS: Very experimental tool
/usr/bin/pp: Packing ocsinventory-agent
/usr/bin/pp: Writing PAR on ocsinventory-agent.par
Could not get version from /home/pchamorro/Ocsinventory-Unix-Agent-2.4.2/lib/Ocsinventory/Agent/Modules/Snmp/3375.pm by executing:
BEGIN { my $dummy = q#  Hide from _packages_inside()
    #; package Module::Metadata::_version::p2;
    use version;
    no strict;
      $vsub = sub {
        local $VERSION;
        $VERSION=undef;
            my $VERSION=$session->get_request ( -varbindlist => [ $snmp_sysProductVersion] );;
        $VERSION
      };
  }

 

The fatal error was: Can't call method "get_request" on an undefined value at (eval 20) line 9, <GEN205> line 42.


 at /usr/share/perl5/vendor_perl/Module/ScanDeps.pm line 530.
/usr/bin/pp: Input file ocsinventory-agent.par was not found
Failed to generate ocsinventory-agent.bin!

by (4.6k points)
 
Powered by Question2Answer
...