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.

Le plugin vCenter ne fonctionne pas avec vCenter 7

Hello,

Nous avons installés le plugin Vmware_Vcenter 2.1 avec OCS inventory v2.10 avec succès

cependant, nous n'arrivons pas à collecter les informations de notre vCenter, rien n'apparait sur le tableau de bord, pour information il s'agit de vCenter version 7

Est ce que quelqu'un d'autre l'a déjà testé avec vCenter et plus particulièrement avec la version 7 ?

Ma config de test : 

- OCS Inventory 2.10 est installé avec un conteneur (Alma 8)
- OCS Agent 2.9.1 est installé sur un serveur distant Centos 7 

Les dépendances requises côté agent OCS semblent respectées 

LWP::UserAgent (sudo dnf install perl-LWP-UserAgent-Determined ) OK ?
JSON (sudo dnf install perl-JSON) OK ?
 

Le test de l'URL est OK code HTTP200)

curl -X POST -k -H 'Authorization: Basic hash:base64' -i 'https://@IP_vCenter/rest/com/vmware/cis/session/'

Les fichiers sur OCS Inventory :

Ajout de la ligne ci dessous dans :  /etc/ocsinventory/modules.conf :
use Ocsinventory::Agent::Modules::Vmware;

sur l'agent OCS le fichier  /usr/share/ocsinventory-reports/ocsreports/extensions/vmware_vcenter/agent/Vmware.pm contient 

# Auth

my @auth_hashes = (

    {

       URL  => "https://@IP_vCenter/",

       AUTH_DIG     => "hash:base64",

    },

);
 

in OCS Inventory NG plugins by (290 points)

4 Answers

+1 vote
Bonjour,

Les packages perl-libwww-perl et perl-JSON doivent être installés sur le poste client et pas le paquet perl-LWP-Useragent-Determined.

Cordialement
by (90.4k points)
0 votes

Bonjour,

Merci, 
après installation du package perl-libwww-perl, des informations (datastores vmware ....) remontent bien dans le log de l'agent OCS après exécution d'un "sudo ocsinventory-agent --debug", mais hélas aucune informations ne s'affichent sur le tableau de bord OCS
Cordialement

by (290 points)
edited by
0 votes
Les fichiers Map.pm et vmware_vcenter.conf sont présents sous /usr/share/ocsinventory-reports/ocsreports/extensions/vmware_vcenter/APACHE/vmware_vcenter.conf sur le conteneur OCS Inventory
Est ce correct ?
by (290 points)
0 votes
Les tables VMWARE_NETWORK, VMWARE_DATASTORE, VMWARE_CLUSTER et probablement toutes les tables VMWARE... sont vides

Pourtant dans les logs de l'agents OCS, des informations concernant les datastores sont remontées
<VMWARE_CLUSTER>

      <CLUSTER>domain-c13</CLUSTER>

      <DATACENTER>datacenter-2</DATACENTER>

      <DRS_ENABLED>false</DRS_ENABLED>

      <HA_ENABLED>false</HA_ENABLED>

      <NAME>RDCluster01</NAME>

    </VMWARE_CLUSTER>

    <VMWARE_DATACENTER>

      <DATASTORE_FOLDER>group-s5</DATASTORE_FOLDER>

      <HOST_FOLDER>group-h4</HOST_FOLDER>

      <NAME>Datacenter01</NAME>

      <NETWORK_FOLDER>group-n6</NETWORK_FOLDER>

      <VM_FOLDER>group-v3</VM_FOLDER>

    </VMWARE_DATACENTER>

    <VMWARE_DATASTORE>

      <CAPACITY>1191584989184</CAPACITY>

      <DATACENTER>datacenter-2</DATACENTER>

      <DATASTORE>datastore-10</DATASTORE>

      <FREE_SPACE>162456928256</FREE_SPACE>

      <IS_ACCESSIBLE>true</IS_ACCESSIBLE>

      <MULTIPLE_HOST_ACCESS>false</MULTIPLE_HOST_ACCESS>

      <NAME>ESX5_local_SAS10K</NAME>

      <THIN_PROVISIONING_SUPPORTED>true</THIN_PROVISIONING_SUPPORTED>

      <TYPE>VMFS</TYPE>

    </VMWARE_DATASTORE>

    <VMWARE_DATASTORE>

.....

    </VMWARE_NETWORK>

    <VMWARE_NETWORK>

      <DATACENTER>datacenter-2</DATACENTER>

      <NAME>VM Network</NAME>

      <NETWORK>network-11</NETWORK>

      <TYPE>STANDARD_PORTGROUP</TYPE>

    </VMWARE_NETWORK>

  </CONTENT>

  <DEVICEID>ESXL245-2023-05-11-11-44-19</DEVICEID>

  <QUERY>INVENTORY</QUERY>

</REQUEST>

[Wed May 17 10:19:59 2023][debug] =BEGIN=SERVER RET======

[Wed May 17 10:19:59 2023][debug] $VAR1 = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>

<REPLY>

  <RESPONSE>NO_ACCOUNT_UPDATE</RESPONSE>

</REPLY>

';

[Wed May 17 10:19:59 2023][debug] =END=SERVER RET======

[Wed May 17 10:19:59 2023][debug] Calling handlers : `end_handler'

[Wed May 17 10:19:59 2023][debug] [snmpscan] Calling snmp_end_handler

[Wed May 17 10:19:59 2023][debug] [download] Calling download_end_handler

[Wed May 17 10:19:59 2023][info] [download] Beginning work. I am 23383.

[Wed May 17 10:19:59 2023][info] [download] Option turned off. Exiting.

[Wed May 17 10:19:59 2023][debug] [download] End of work...

[Wed May 17 11:05:05 2023][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.9.1

[Wed May 17 11:05:05 2023][debug] Log system initialised (File)

[Wed May 17 11:05:05 2023][debug] --scan-homedirs missing. Don't scan user directories

[Wed May 17 11:05:05 2023][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__@IP_ocsinventory/ocsinv.adm

[Wed May 17 11:05:05 2023][debug] OCS Agent initialised

[Wed May 17 11:05:05 2023][debug] Turns hooks on for /etc/ocsinventory/modules.conf

[Wed May 17 11:05:05 2023][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.9.1

[Wed May 17 11:05:05 2023][debug] Log system initialised (File)

[Wed May 17 11:05:05 2023][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.9.1

[Wed May 17 11:05:05 2023][debug] Log system initialised (File)

[Wed May 17 11:05:05 2023][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.9.1

[Wed May 17 11:05:05 2023][debug] Log system initialised (File)

[Wed May 17 11:05:05 2023][debug] Calling handlers : `start_handler'

[Wed May 17 11:05:05 2023][debug] [snmpscan] Calling snmp_start_handler

[Wed May 17 11:05:05 2023][debug]  - Net::SNMP loaded

[Wed May 17 11:05:05 2023][debug] [download] Calling download_start_handler

[Wed May 17 11:05:05 2023][debug]  - LWP loaded

[Wed May 17 11:05:05 2023][debug]  - LWP::Protocol::https loaded

[Wed May 17 11:05:05 2023][debug] Compress::Zlib is available.

[Wed May 17 11:05:05 2023][debug] Calling handlers : `prolog_writer'

[Wed May 17 11:05:05 2023][debug] checking XML

[Wed May 17 11:05:05 2023][debug] sending XML

[Wed May 17 11:05:05 2023][debug] sending: <?xml version="1.0" encoding="UTF-8"?>

<REQUEST>

  <DEVICEID>HOSTNAME-2023-05-11-11-44-19</DEVICEID>

  <QUERY>PROLOG</QUERY>

</REQUEST>

....
by (290 points)
 
Powered by Question2Answer
...