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

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

Pas prise en compte du /tag="test" lors installation OCS-NG-Windows-Agent-Setup.exe en ligne de commande

Bonjour,

J'essaie d'installer OCS-NG-Windows-Agent-Setup.exe en local sur ma machine en y aposant un tag "test" mais celui-ci n'est pas pris en compte...

Voici la ligne que je tape :

F:\stage\OCS\ocs_inventory_agent\ocs_agent_unzip\OCSNG-Windows-Agent-2.0.5>OCS-N
G-Windows-Agent-Setup.exe /s /nosplash /now /server=http://10.1.100.66/ocsinvent
ory /debug=2 /tag="test"

Ensuite on me demande les droits d'administrateur pour exécuter le programme.

Mais quand je vais sur mon interface serveur d'OCS :

Du coup, je vais sur mon fichier C:\ProgramData\OCS Inventory NG\Agent\ocsinventory :

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=2
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://192.168.0.253/ocsinventory
SSL=1
CaBundle=cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
PROLOG_FREQ=1
OLD_PROLOG_FREQ=1
TTO_WAIT=2760


Effectivement j'ai "NoTAG=0" donc pas de tag défini non ?

Ensuite dans le doute, je vais voir le fichier de log, C:\ProgramData\OCS Inventory NG\Agent\ocsinventory.log :

Starting OCS Inventory NG Agent on Tuesday, May 12, 2015 11:09:59.
AGENT => Running OCS Inventory NG Agent Version 2.0.5.0
AGENT => Using OCS Inventory NG FrameWork Version 2.0.5.0
AGENT => Loading plug-in(s)
    DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files (x86)\OCS Inventory Agent\plugins>
    DLL PLUGIN => 0 DLL Plug-in(s) succesfully loaded on 0 DLL(s) found
AGENT => Using network connection with Communication Server
    COM PROVIDER => Loading Communication Provider <C:\Program Files (x86)\OCS Inventory Agent\ComHTTP.dll>
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.0.5.0>
    AGENT => Tag forced by /TAG, value is <test>
AGENT => Writing configuration to file <C:\ProgramData\OCS Inventory NG\Agent\ocsinventory.ini>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00.

Je vois "AGENT => Tag forced by /TAG, value is <test>" donc pq mon paramètre est vérifié dans le fichier de log mais pas dans le fichier de configuration de l'agent ??

Merci

in OCS Inventory NG agent for Windows by (2k points)

8 Answers

0 votes

Bonjour

Demande à utilisateur un tag. 

Extrait de la doc => /notag : Agent must NOT prompt user for TAG in any case

http://wiki.ocsinventory-ng.org/index.php/Documentation:WindowsAgent#Sample_configuration_file_.22ocsinventory.ini.22.
; Disable prompting user for TAG value (0 => prompt allowed, 1 => disabled) 
NoTAG=0
by (88.5k points)
0 votes
Je n'ai pas envie que ce soit à l'utilisateur d'entrer le TAG, je veux que ce soit moi qui le force lors de mon déploiement.

Donc qu'est-ce que j'ai mal fait dans cette commande qui ne fait pas ajouter un tag "test" :

F:\OCS-NG-Windows-Agent-Setup.exe /s /nosplash /now /server=http://192.168.1.253/ocsinventory /debug=2 /tag="test"

Merci
by (2k points)
edited by
0 votes
Rien! Tout est correct. Le tag doit apparaître dans l'interface web.

Frank
by (88.5k points)
0 votes

J'ai vu ici (https://bugs.launchpad.net/ocsinventory-windows-agent/+bug/802625) qu'il fallait modifier le fichier de conf du server /etc/httpd/conf.d/z-ocsinventory-server.conf comme ceci :

# ===== TAG =====

 

# The default behavior of the server is to ignore TAG changes from the

# agent.

PerlSetEnv OCS_OPT_ACCEPT_TAG_UPDATE_FROM_CLIENT 1

Il fallait mettre 1 au lieu de 0 selon eux

by (2k points)
edited by
0 votes
Et en faisant ce changement, cela répond à ton besoin?

Cordialement

Frank
by (88.5k points)
0 votes

Mais le tag n'a toujours pas été pris en compte malgré ce changement..
Je teste aussi en mode graphique du coup :

Pas de changement...............

Une idée ??

 

by (2k points)
edited by
0 votes
En faite, ma machine était déjà référencé dans ma base de donnée et ne voulais pas mettre le tag à jour. Je l'ai supprimé de ma bdd, supprimé OCS et réinstallé celui-ci, ça fonctionne le tag apparaît.

Dommage qu'il faille :

-supprimer l'agent

-supprimer la machine de la BDD
by (2k points)
0 votes

En faite c'est bon, plus besoin de resuprimmer l'entrer en bdd ni de désinstaller l'agent. Je ne sais pas trop pq ça marche mieux mtn mais bon :)

Voici un exemple de commande :

OCS-NG-Windows-Agent-Setup.exe /s /nosplash /now /server=http://192.168.0.253/ocsinventory /debug=2 /tag="ecole_brisson"

Merci qd même !

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