You are not logged in.
Pages: 1
Hi All,
My OCS<>GLPI sync has been running for a number of years, but I've noticed today that a number of machines are now showing duplicate in GLPI.
Things have changed in GLPI a lot since I last looked at this, but under Rules For Import And Link Computers,
Theres 3 rules:
- OCSNG server is 'SERV1'
- Computer to import : Serial Number is already present in GLPI YES
- Computer to import : Computer's name is already present in GLPI YES
Under Actions:
OCSNG link Assign Link if possible
So if I've got that right, it should only link if both the Serial and Computer name is the same right ?
Does it create a new entity if either is different?
(in my examination so far, machines that are Dupes do have the same Serial and Computer name exactly).
As a result, I could really do with a way of merging the Computer items, as I've finance data, associated tickets etc.
I had a look in the forums, and in the plugins list, but haven't seen anything conclusive.
I've asked something similar previously back in 2010:
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Try with glpi 0.80.5 which fixes some bug in ocs links, and don't forget to "clean OCS links", at least once, after the update.
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
Hi Remi,
Thanks for that, I'll take a look. Looking at some sample machines though, and assuming that when it 'split' leaves the last OCS sync date alone, some go back over 6 months ago.
When I could really do with now, is a way of merging two computers into one, so that I don't have to do it by hand.
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Actually - what does the 'Clean ocs links' do ?
I just looked at that, and all the machines its showing in that list, all have several duplicates.
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Ok,
I've upgraded to 0.80.5 and run the clean OCS links.
I'm still finding duplicates, and for example, it looks to me as though one issue may be the "viewing".
For example, I have two computers showing in the computer.php output, but in actual fact, both have a GLPI Computer ID of 342 - so its the same entry, being shown twice in the viewer...
Last edited by adrianmarsh (2011-10-26 17:24:22)
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
ohhh even weirder....
342 in the 'list view' shows two different OCS last-sync dates... but when I click on each individual "computer", it shows no OCS link at all for either...
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
If I run a SQL command : SELECT * FROM `glpi`.`glpi_computers` WHERE id = '342'
then it only returns one line, but GLPI shows two rows.
So this one seems like a bogus duplicate ??
EDIT: After the OCS Clean link (which has now thrown some of my good data into the bin :-( ), I now see 4 sets of dual-duplicates in the list. However, 3 of the sets all point to the same internal computer ID per set (but give different bits of data in the list - Service Pack etc).
Last edited by adrianmarsh (2011-10-26 18:03:25)
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Can you check content of glpi_ocslinks for the computer which have 4 entries (search computers_id) ?
Also check than the linked computer exists in OCS DB (glpi_ocslinks.ocsid => hardware.ID)
It seems you have more than 1 link to OCS for this computer (which should not be possible, bug fixed in previous GLPI version)
Probably, your rules are not really well configured...
I think "clean OCS links" should have delete this... (except if the linked computer really exists in OCS...)
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
Hi Remi,
I will do that. For now I've stopped the auto-sync. I also looked into OCS, and found a few 'duplicates' in there and I've cleaned those out. Unfortunately GLPI then removed some machines into Trash (I've restored them).
Now that I've done all that, the weird dupes-but-not seem to of gone...
For my sync config:
I'm not too sure about the rules myself, but they've been there since way back in 0.72.x I think...
basically I want to sync based on HOSTNAME and SERIAL #.
Heres the current rule:
http://uploadpic.org/v.php?img=TdgAdF7cyD
I'm not really sure how that imports 'new' machines, but it seems to, and I've only 1 rule.
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
> Now that I've done all that, the weird dupes-but-not seem to of gone...
Ok. It was what I expect.
With 0.80.5, this issue should not happen anymore.
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
> Unfortunately GLPI then removed some machines into Trash (I've restored them).
This is a configurable behavior.
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
Hi Remi,
yes I found that option afterwards..
I think I've figured out some of the issues around the auto-import too. I'll post back if I can't figure something out.
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
One question,
Does the ocsng automatic actions, use the Rules when linking machines ??
As a test, I changed my link rule to the below, expecting GLPI to only sync one computer, instead, it brought in 20
I recrafted it to avoid any OCS messups involving N/A as the serial, and then added the last UBIQ-DELL249 so it would restrict it to just one machine (for testing).
the logical Operator is AND, so I expected it to AND all the operations together, where only 1 machine should match.
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
> Does the ocsng automatic actions, use the Rules when linking machines ??
Yes. And only for new computer (to make a choice between link or import)
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
So looking into this in more depth, and after checking the wiki (I'm guessing thats out of date now).
In the Actions:
Whats the difference between "Link if possible" and "Link if possible, otherwise imports declined"
- I'm guessing that means: "if this rule doesn't match, then no import and continue process rules" and "if this rule doesn't match, no import and stop processing" ?
What does 'to be unaware of import' mean ?
And just so I understand the ocsng automatic action:
- It always imports existing machines (ignoring any rules) ?
- For new computers only, then the rules are used to 'link' to an existing GLPI Computer object.
- If we delete all the Rules, then a 'new computer' would never get imported - right ?
Last edited by adrianmarsh (2011-10-27 14:03:57)
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
Ok,
So I just added a brand new machine to OCS, that GLPI wouldn't be able to match to an existing machine.
I expected the machine not be be automatically imported, as I have a rule that says:
"Computer to import : Serial Number is already present in GLPI Yes"
Yet GLPI imported the machine as a new object.
If I don't want this to happen - how do I stop it ??
I noticed theres another ruleset under:
"Rules for assigning a computer to an entity"
Would that be the cause for the new creation ??
GLPI 0.83.91/CENTOS5 - OCS 1.01/Win2003
Offline
hello!! Very interesting discussion glad that I came across such informative post
Offline
Pages: 1