Ocs inventory agent for linux

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

This is the OCS unified agent for Unix operating systems

License

OCSInventory-NG/UnixAgent

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Banner

Ocsinventory-Agent is an agent for ocsinventory NG. It supports Linux, Solaris and AIX. *BSD support is in progress.

The following modules are needed:

- Digest::MD5 - XML::Simple - Net::IP optional, it is only needed to compute the network information - LWP - Mac::SysProfile 0.0.5 : this module is need on MacOSX to collect the device informations. - To get SSL communications working (for packages deployment or HTTPS communications to OCS server), you need these modules: - Crypt::SSLeay if you use LWP prior to version 6 - LWP::Protocol::https if you use LWP version 6 or more - Net::CUPS is used to detect the printer - Net::SNMP to scan network devices using SNMP - To enhance SNMP feature with custom networks scans, you need these modules: - Net::Netmask - Net::Ping or Nmap::Parser - Data::UUID is used to create a unique id for every machine - Parse::EDID is used to inventory monitor and will replace monitor-edid from Mandriva. 

The following commands are needed:

- dmidecode on Linux and *BSD (i386, amd64, ia64) => dmidecode is required to read the BIOS stats. - lspci on Linux and *BSD (pciutils package) => lspci is required to list PCI devices. - sneep on Solaris/sparc, you must install sneep and record the Serial Number with it (download it from http://www.sun.com/download/products.xml?id=4304155a) - To get the serial number of the screen you will need one of these tools: - monitor-edid from Mandriva is needed to fetch the monitor. A package is available in Fedora repository. information http://wiki.mandriva.com/en/Tools/monitor-edid - get-edid from the read-edid package - ipmitool if you want to collect information about IPMI - Nmap (v3.90 or superior) to scan network devices for Ipdiscover 

The following PERL modules are optional:

Читайте также:  Ssh config linux password

- Proc::Daemon Daemon mode - Proc::PID::File brings the pid file support if Proc::Daemon is installed - Compress::Zlib 

The following module is needed if you plan to prepare a tarball or install directly from the Bazaar devel branch. (See SOURCES below.):

Once the archive is unpacked, use these commands:

perl Makefile.PL make make install 

If you want to turn off the interactive post install script, just do (instead of perl Makefile.PL)

PERL_AUTOINSTALL=1 perl Makefile.PL 

You can also run the agent from the tarball directory. In this case, use the —devlib flag to load the library from the local directory.

You need to launch the agent with root privilege. For debugging you can try to launch it with the -l flag:

Ex: ocsinventory-agent -l /tmp —debug

It’s also possible to run directly from the tarball directory:

sudo ./ocsinventory-agent —devlib —server http://foo/ocsinventory

  • Sun Studio seems to be needed to build the dependency.
  • The generated Makefile needs gmake to be exectuted
  • The default installation will install the binary in /usr/perl5/5.XXXXX/bin, set your $PATH variable according to that.
  • If you use crontab to launch the agent you’ll probably have to redefine the PATH. For example, just add something like: PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin At the beginning of the cron file.
  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Add your changes: git add folder/file1.php
  4. Commit your changes: git commit -m ‘Add some feature’
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request !

OCS Inventory is GPLv2 licensed

The memconf script is maintained by Tom Schmidt http://www.4schmidts.com/memconf.html Copyright © 1996-2017 Tom Schmidt

memconf is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Ocsinventory::Agent::Backend::Virtualization::Vmsystem uses code from imvirt:

Copyright Holder: 2008 (C) IBH IT-Service GmbH [http://www.ibh.de/]

License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Ocsinventory::Agent::Backend::OS::Linux::Storages::Adaptec uses code from Parse-Arcconf:

Читайте также:  Linux listing open ports

License and Copyright: Copyright (C) 2012 Mathieu Alorent

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information.

About

This is the OCS unified agent for Unix operating systems

Источник

Install OCS Inventory Agent on Debian 10/Ubuntu 18.04

Once you have setup your OCS Inventory server, you can now add agents for managing. In this guide, we are going to learn how to Install OCS-NG Inventory Agent on Debian 10/Ubuntu 18.04.

Learn how to setup OCS Inventory server on Fedora 30/Fedora 29 by following the link below;

Install OCS Inventory Agent on Debian 10/Ubuntu 18.04

Run system update

Install Required Libraries

To install OCS Inventory agent will all the required packages, run the command below;

apt install libmodule-install-perl dmidecode libxml-simple-perl libcompress-zlib-perl libnet-ip-perl libwww-perl libdigest-md5-perl libdata-uuid-perl

Install OCS Inventory Agent from APT

Run the command below to install OCS agent.

apt install ocsinventory-agent

During the installation, you are prompted to choose how the OCS agent will communicate with OCS server. Since we already setup the OCS server, select the http method and proceed.

OCS agent method

OCS Inventory agent Server URL

Next, set the OCS server URL. The syntax is http[s]://ocsinventory-ng-server[:port]/ocsinventory usually for http(s) methods.

This will be written to /etc/ocsinventory/ocsinventory-agent.cfg configuration file.

Install OCS Agent from Source

Note that OCS agent installed from default system packages might be older. Also, installing OCS agent from source requires that some build tools and dependencies be installed first.

apt install make gcc libmodule-install-perl dmidecode libxml-simple-perl libcompress-zlib-perl openssl libnet-ip-perl libwww-perl libdigest-md5-perl libdata-uuid-perl libcrypt-ssleay-perl libnet-snmp-perl libproc-pid-file-perl libproc-daemon-perl net-tools libsys-syslog-perl pciutils smartmontools read-edid nmap libnet-netmask-perl

To install a newer version of OCS Agent, navigate to the OCS Inventory downloads page and grab the source file for the new version. For example, this guide uses OCS Agent v2.4.2 and can be downloaded as follows;

wget https://github.com/OCSInventory-NG/UnixAgent/releases/download/v2.4.2/Ocsinventory-Unix-Agent-2.4.2.tar.gz

Once the download is done, extract the source code.

tar xzf Ocsinventory-Unix-Agent-2.4.2.tar.gz

Navigate to OCS Inventory agent source directory

cd Ocsinventory-Unix-Agent-2.4.2

OCS Agent can be installed interactively or non-interactively.

To install OCS agent non-interactively, simply run the commands below;

sudo env PERL_AUTOINSTALL=1 perl Makefile.PL

To install OCS agent interactively, simply run the commands below;

While setting up the address of your ocs server, if you are using hostname, ensure that it is resolvable.

. Do you want to configure the agent Please enter 'y' or 'n'?> [y] y Where do you want to write the configuration file? 0 -> /etc/ocsinventory 1 -> /usr/local/etc/ocsinventory 2 -> /etc/ocsinventory-agent ?> 2 Do you want to create the directory /etc/ocsinventory-agent? Please enter 'y' or 'n'?> [y] y Should the old unix_agent settings be imported ? Please enter 'y' or 'n'?> [y] y [info] The config file will be written in /etc/ocsinventory-agent/ocsinventory-agent.cfg, What is the address of your ocs server?> https://ocs.kifarunix-demo/ocsinventory Do you need credential for the server? (You probably don't) Please enter 'y' or 'n'?> [n] n Do you want to apply an administrative tag on this machine Please enter 'y' or 'n'?> [y] y tag?> test-deb10 Do yo want to install the cron task in /etc/cron.d Please enter 'y' or 'n'?> [y] y Where do you want the agent to store its files? (You probably don't need to change it)?> [/var/lib/ocsinventory-agent] Do you want to create the /var/lib/ocsinventory-agent directory? Please enter 'y' or 'n'?> [y] y Should I remove the old unix_agent Please enter 'y' or 'n'?> [n] y Do you want to activate debug configuration option ? Please enter 'y' or 'n'?> [y] n Do you want to use OCS Inventory NG UNix Unified agent log file ? Please enter 'y' or 'n'?> [y] y Specify log file path you want to use?> /var/log/ocs-agent.log Do you want disable SSL CA verification configuration option (not recommended) ? Please enter 'y' or 'n'?> [n] Do you want to set CA certificate chain file path ? Please enter 'y' or 'n'?> [y] Specify CA certificate chain file path?> /etc/ocsinventory-agent/cacert.pem Do you want to use OCS-Inventory software deployment feature? Please enter 'y' or 'n'?> [y] Do you want to use OCS-Inventory SNMP scans feature? Please enter 'y' or 'n'?> [y] Do you want to send an inventory of this machine? Please enter 'y' or 'n'?> [y] . 

OCS Agent-Server Communication

By default, OCS agent is set to communicate with the server once a day via the daily cron job, /etc/cron.daily/ocsinventory-agent.

Читайте также:  Creating linux link files

To force the agent to communicate to the server immediately, you can run;

ocsinventory-agent --server http://OCS-ADDRESS[:port]/ocsinventory
ocsinventory-agent --server http://ocsinv.example.com/ocsinventory

Install OCS Inventory Agent on Debian 10/Ubuntu 18.04

You can now login to your OCS Inventory server and verify that the assets have been inventoried.

Click on All Computers tab to see a list your assets.

OCS Inventory Agent

You can also configure OCS Agent to inventory the system hourly via the cron job.

mv /etc/cron.daily/ocsinventory-agent /etc/cron.hourly

Well, that is just it on how to install OCS Agent on Debian 10/Ubuntu 18.04. Feel free to explore this tool further.

Reference;

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We’re passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Источник

Оцените статью
Adblock
detector