PluginsOCSInventory-NG / vmwareVcenter

This plugin allow the unix agent to retrieve vmware servers informations using the latest REST Api.
GNU General Public License v3.0
5 stars 3 forks source link

Plugin VMWare VCenter

Banner

Plugin VMWare VCenter

Some Links:
Ask question | Website | OCS Professional

Description

This plugin is made to retrieve all VCenter informations using the new REST api from VMWare VCenter. Link : https://code.vmware.com/apis/62/vcenter-management

NOTE : This plugin is missing some VCenter VM inventoried data (WIP)

Prerequisite

The following configuration need to be installed on your VCenter :

  1. VCenter 6.5 and newer (see link above)
  2. A user with read rights on the API and VCenter infrastructure

The following OCS configuration need to be installed :

  1. Unix agent 2.3 and newer
  2. OCS Inventory 2.3.X recommended

The following dependencies need to be installed on agent :

  1. LWP::UserAgent
  2. JSON

Used API routes

This following routes are used by the API :

Configuration

To configure a new server to scan you need to edit the Vmware.pm file.

Line 18 :

my @auth_hashes = (
    {
       URL  => "MY_FIRST_VMWARE_SERVER",
       AUTH_DIG     => "My Auth digest (user:pass encoded in base 64)",
    },
    {
       URL => "MY_SECOND_VMWARE_SERVER",
       AUTH_DIG    => "My Auth digest (user:pass encoded in base 64)",
    },
);

You need to change the URL to your VMWare server url / ip and set the AUTH_DIG to user + pass encoded in base 64

If you have more than one server you need to add the following line below the last URL + AUTH_DIG values :

    {
       URL => "MY_THIRD_VMWARE_SERVER",
       AUTH_DIG    => "My Auth digest (user:pass encoded in base 64)",
    },

Note : there is no limit on server number

Todo

  1. Add GUI representations for inventoried data in ocsreports