You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2009-12-10 17:49:47

Peveks
Member
Registered: 2009-07-22
Posts: 11

Auto Sync between OCS and GLPI

Hello.

Is it possible to automate synchronization between GLPI and OCS? I've founded in GLPI WIKI :

GLPI use an internal “pseudo cron”. Scheduled tasks are launch automatically when there is activity on the application (by connected users calling pages).

If you want this tasks to be launched even without any activity, you can create a system planified task.

But where can be founded this “pseudo cron”. I understand how to run /glpi/front/cron.php in Windows every 5 minutes, but how to force GLPI sychronize data with OCS in automatic mode?

Thank you very much.

Offline

#2 2009-12-10 18:05:36

ddurieux
Plugins Dev
From: Propières, France
Registered: 2005-06-17
Posts: 7,521

Re: Auto Sync between OCS and GLPI

Use the plugin "import OCS" (ex massocsimport)

Offline

#3 2010-01-04 13:11:59

Chris_K
Member
Registered: 2009-12-15
Posts: 7

Re: Auto Sync between OCS and GLPI

It seems that I can import new computers with this plugin but I cannot get to synchronize existing computers. In OCS I have inventory date of 2010-01-04 12:00 in GLPI Last update 2010-01-04 09:00
I run the sh ocsng_fullsync.sh --nolog command and it inserts new computers but doesn't update existing once.
I tried to change the Number of computers to synchronize using the cron parameter, by setting it to 0 or to 100 doesn't make any difference.

Any ideas?

Chris

Offline

#4 2010-01-05 09:38:09

yllen
GLPI-DEV
From: Sillery (51)
Registered: 2008-01-14
Posts: 15,278

Re: Auto Sync between OCS and GLPI

Chris_K wrote:

I tried to change the Number of computers to synchronize using the cron parameter, by setting it to 0 or to 100

If you use plugin massocsimport, you must put this parameter to 0.
What are your parameters in link tab ?
Have you looking at glpi/files/_log/ocsng_fullsync.log ?


CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6  - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)

Offline

#5 2010-01-05 09:59:57

Chris_K
Member
Registered: 2009-12-15
Posts: 7

Re: Auto Sync between OCS and GLPI

The parameter is set to 0
Today I must say it seems like synchronization worked.

I assumed that configuration in OCS must change every time I run OCS agent because the amount of free/used space on filesystem changes. Maybe there is a round about to MB to which there is no difference for the synchronization to occur?


BTW I noticed another problem:

In information about script execution it says:
Impotred machines:6
Synchronized machines:4
Rest is 0

I click the proces number to see the details and I have 2 threads:
1 - Imp 2 synch 1
2 - Imp 3 synch 3

Something doesn't add up

Log:

Tue Jan 5 08:31:23 CET 2010 ocsng_fullsync.sh started
=====================================================
        Clean old Not Imported machine list (0)
        Manage delete items in OCS server #2: "172.26.0.18"
=====================================================
        Thread #1 : starting (1/2)
        Thread #1 : import computers from server: '172.26.0.18'
        Thread #1 : 3 computer(s)
...     Thread #1 : done ..
=====================================================
=====================================================
        Thread #2 : starting (2/2)
        Thread #2 : import computers from server: '172.26.0.18'
        Thread #2 : 6 computer(s)
......  Thread #2 : done ..
=====================================================
cleaning up.
Tue Jan 5 08:31:25 CET 2010 ended

Offline

#6 2010-01-05 10:33:08

remi
GLPI-DEV
From: Champagne
Registered: 2007-04-28
Posts: 7,127
Website

Re: Auto Sync between OCS and GLPI

I don't understand what is your problem...

You launch 2 thread and you see 2 thread.

+


Dév. Fedora 29 - PHP 5.6/7.0/7.1/7.2/7.3/7.4 - MariaDB 10.3 - GLPI master
Certifié ITILv3 - RPM pour Fedora, RHEL et CentOS sur https://blog.remirepo.net/

Offline

#7 2010-01-06 12:08:23

Chris_K
Member
Registered: 2009-12-15
Posts: 7

Re: Auto Sync between OCS and GLPI

for the same synchronization in one place I receive information that it synchronized 10 computers whereas in another place for this same synchronization it say 9 computers
9!=10

Offline

#8 2011-01-13 11:25:54

The_Beginner
Member
Registered: 2011-01-11
Posts: 5

Re: Auto Sync between OCS and GLPI

yllen wrote:
Chris_K wrote:

I tried to change the Number of computers to synchronize using the cron parameter, by setting it to 0 or to 100

If you use plugin massocsimport, you must put this parameter to 0.
What are your parameters in link tab ?
Have you looking at glpi/files/_log/ocsng_fullsync.log ?

Hello everybody,

i try to use the plugin "massocsimport". The GLPI software write that the plugin will be installed, but it doesn´t put the information from ocs to glpi. In one dokumentation comprised that I have to start the ocsng_fullsync.sh. Could you tell me, how I can start it?
I am not sure that the plugin is really install, because the path or rather the file is not exist, what you Chris_K has written.
yours faithfully
The_Beginner

Offline

#9 2011-01-13 11:26:36

The_Beginner
Member
Registered: 2011-01-11
Posts: 5

Re: Auto Sync between OCS and GLPI

Sorry I mean you yllen.

Offline

#10 2011-07-05 04:37:42

rcoulter918
Member
Registered: 2011-07-05
Posts: 1

Re: Auto Sync between OCS and GLPI

Hi all,  I'm having a similar problem.  I'm using the latest release of OCS and GLPI (0.80.1) running on a Windows 2003 server.  I need to configure GLPI to autosync to OCS and I'm having difficulity getting the script to run.  I've installed the massocsimport plug in and activated it.  How do I run this from a scheduled task?  I tried testing this via cmd prompt and got the message "run as apache user".  I've checked the sync logs and the script is not running at all.

Appreciate any help possible.

Offline

Board footer

Powered by FluxBB