OCS Inventory NG Forums

OCS Inventory NG, an OpenSource computer inventory and package deployement system for Windows and Unix

You are not logged in.

#1 2012-07-02 15:13:19

torrwarez
Member
Registered: 2009-10-26
Posts: 30

OcsInventory.ini et Service.ini

Bonjour à tous,

Je voulais savoir si la syntaxe du nouveau fichier OcsInventory.ini est la même que l'ancien ? Par exemple, si je copie et je colle l'ancien code dans le nouveau OcsInventory.ini, est-ce que les remontées vont toujours fonctionner?

Voici un extrait de l'ancien fichier .ini :

[OCS_SERVICE]
Server=ocsinventory-ng.group.tok
Pnum=82
NoProxy=0
Miscellaneous=/tag:"TF" /SERVER:ocsinventory-ng.group.tok /PNUM:82
auth_user=none
auth_pwd=none
PROLOG_FREQ=24
OLD_PROLOG_FREQ=24
TTO_WAIT=57660

Voici un extrait du nouveau fichier .ini

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=0
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://ocsinventory-ng.group.tok:82/ocsreports
SSL=1
CaBundle=cacert.pem
AuthRequired=1
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=1
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
PROLOG_FREQ=10

Merci à vous.

Last edited by torrwarez (2012-07-02 15:16:02)

Offline

#2 2012-07-02 16:50:59

Nachtfalke
Moderator
From: Germany
Registered: 2012-02-20
Posts: 592

Re: OcsInventory.ini et Service.ini

Why do you want to copy your old .ini into the new .ini ?
You probably do not need to change anything on the .ini if your chose the /UPGRADE parameter when installaing the new agent over an old one.


Best way would be to install the new agent an a new VM and take a look at the .ini files and compare them.
But in your case you probably need to correct the server path - your pathe above is wrong - you need this:
Server=http://ocsinventory-ng.group.tok:82/ocsinventory


SSL=1 if you want SSL / httpS


Most of the rest - not sure about the TAG - will be set automatically after installation and some settings will be set on the ocs server (PROLOG_FREQ)

Offline

#3 2012-07-03 07:14:50

torrwarez
Member
Registered: 2009-10-26
Posts: 30

Re: OcsInventory.ini et Service.ini

Hi,

Because we need some parameters like tag to identify different site in France, like PR for PARIS, MT for Metz..., so we replace the existent .ini to put the new parameters.

Offline

#4 2012-07-03 07:19:10

guerinat
Moderator
Registered: 2011-03-30
Posts: 355

Re: OcsInventory.ini et Service.ini

Le tag qui permet d'identifier les machines actuellement sera conservé lors d'une mise à jour des agents. Nul besoin de se tracasser à essayer de copier les paramètres de configuration, tout se fait automatiquement lors de la mise à jour.
Faites le test en mettant à jour une machine, vous verrez bien que le tag est conservé sans problème.

Offline

#5 2012-07-03 09:38:57

Nachtfalke
Moderator
From: Germany
Registered: 2012-02-20
Posts: 592

Re: OcsInventory.ini et Service.ini

@guerinat
To add something to your post. There are different ways to add a tag:

1.) You add a label on OCS server GUI and the user will be prompted on first agent start to enter a TAG -> This will be saved on mysql database on server. If you do not prompt the user for adding a TAG the TAG stored on the database will be used because
2.) If the user did not add any TAG or the administrator wants to change the TAG he can do this for every host from OCS server GUI.


@torrwarez
So in your case just run the installer on every agent with the /UPGRADE parameter and set the correct server address (new syntax with port).
If you are using a SSL connection you have to specifiy the certificate.pem path and you have to set SSL=1 (I could not see any of these parameters in the old .ini). If you do not use SSL the set it to SSL=0 and no need for a certificate and path (perhaps it is easier to deploy this in a later deployment).


Perhaps it would make sense to set "Debug=1" got get more output in ocsinventory.log and download.log - if you need it.
HKCU is useless if your agent is running as a service because service has now access to HKCU
IpDisc if for IpDiscovery and can be set from OCS server GUI
NoTag should be 0 by default so the user is not prompted for any TAG (you have it already in the mysql db)
PROLOG_FREQ can be set from OCS server GUI


Hope this will help you - et exuses-moi mais je ne parle pas francais très bien. Je lire un peu mais je n'encrise pas tres bien wink

Offline

#6 2012-07-03 15:09:12

torrwarez
Member
Registered: 2009-10-26
Posts: 30

Re: OcsInventory.ini et Service.ini

guerinat wrote:

Le tag qui permet d'identifier les machines actuellement sera conservé lors d'une mise à jour des agents. Nul besoin de se tracasser à essayer de copier les paramètres de configuration, tout se fait automatiquement lors de la mise à jour.
Faites le test en mettant à jour une machine, vous verrez bien que le tag est conservé sans problème.

C'est à dire que les paramètre contenues dans l'ancien fichier ini sera automatiquement adapté pour le nouveau fichier ini ?

Offline

#7 2012-07-03 15:24:36

guerinat
Moderator
Registered: 2011-03-30
Posts: 355

Re: OcsInventory.ini et Service.ini

Oui, en prenant en compte les paramètres serveur en plus. Comme la fréquence d'inventaire par exemple qui sera celle imposée par le serveur.

Offline

#8 2012-07-03 15:36:50

torrwarez
Member
Registered: 2009-10-26
Posts: 30

Re: OcsInventory.ini et Service.ini

Thank you Nachtfalke for your answer.

Your french is not bad !

My server is set on

http://ocsinventory-ng.group.tok:82/ocsreports

And how can i specify a tag in the .ini file ?

Last edited by torrwarez (2012-07-03 15:37:21)

Offline

#9 2012-07-03 19:01:06

Nachtfalke
Moderator
From: Germany
Registered: 2012-02-20
Posts: 592

Re: OcsInventory.ini et Service.ini

torrwarez wrote:

Thank you Nachtfalke for your answer.

Your french is not bad !

My server is set on

http://ocsinventory-ng.group.tok:82/ocsreports

And how can i specify a tag in the .ini file ?


You server address is wrong!!! You need this one:
http://ocsinventory-ng.group.tok:82/ocsinventory


The TAG can not be set on .ini file as far as I know.
You can set a TAG when installing/upgrading an agent with this command line parameter:  /tag="my value"
http://wiki.ocsinventory-ng.org/index.p … ne_options.


But if I understand you correct - your intention is to upgrade from an old agent version to a new agent version without losing anything, right ?
Then just run this command:

OCSWindows-Agent-setup.exe /SERVER=http://ocsinventory-ng.group.tok:82/ocsinventory /S /UPGRADE /NOTAG /SSL=0

Offline

#10 2012-07-04 08:33:09

torrwarez
Member
Registered: 2009-10-26
Posts: 30

Re: OcsInventory.ini et Service.ini

Thank you very much for your help !

But just one problem, when i try to access on

http://ocsinventory-ng.group.tok:82/ocsinventory

i have an Error 400

Offline

#11 2012-07-04 11:08:26

Nachtfalke
Moderator
From: Germany
Registered: 2012-02-20
Posts: 592

Re: OcsInventory.ini et Service.ini

@torrwarez
For accessing the GUI with a web-browser you have to use:
http://ocsinventory-ng.group.tok:82/ocsreports


The agent needs another URL for contacting the server in the ocsinventory.ini
http://ocsinventory-ng.group.tok:82/ocsinventory

Offline

#12 2012-07-10 12:31:02

torrwarez
Member
Registered: 2009-10-26
Posts: 30

Re: OcsInventory.ini et Service.ini

But at the moment, the inventory is working well with the wrong address :S

Offline

Board footer

Powered by FluxBB

Serveur dédié, hébergement web, infogérance et nom  de domaine - NFrance Conseil