You are not logged in.
Pages: 1
I have GLPI Set up with OCS Inventory and I was wondering if there was a way to get either system to automatically change the "Location" of each PC based on IP.
I have looked around in the Rules but dont see a way to do this. Is it possible?
I found the administrative Data and it looks like I might be able to use that. I will post in the OCS Inventory Forums also.
Last edited by jghake (2009-11-23 18:56:43)
GLPI 0.72.3 on IIS, Server 2003 Std SP2, PHP 5.3.1, MySQL 5.5
Offline
Let us know what you find, I've been looking to do this also.
My Configuration: GLPI .72.3 running on XAMPP from a VMware Virtual Machine (Windows XP). PHP 5.2, Apache 2.2.3...
Offline
My post over at OCS can be viewed here:
GLPI 0.72.3 on IIS, Server 2003 Std SP2, PHP 5.3.1, MySQL 5.5
Offline
I was able to get this working! It isn't automatic (I may look at making it so in the future) all the details can be found here:
http://forums.devshed.com/mysql-help-4/ … 56355.html
I created a new Administrative Info within OCS (click on the two pages on the top right and name it Location)
Then basically I created a CSV file with:
Site Name*10.10.1.0*
Site Name 2*10.10.2.0*
Created a table in SQL to hold my Locations, imported the csv into SQL using the command:
LOAD DATA INFILE 'c:\\sites.csv' INTO TABLE locations FIELDS terminated BY '*' LINES terminated BY '\n' (name, ip, netmask);
Then I ran the following to update all computer records with the corresponding Site in my new locations table:
UPDATE networks n, accountinfo a, locations l
SET a.Location = l.name
WHERE n.IPSUBNET = l.ip
AND n.HARDWARE_ID = a.HARDWARE_ID
I hope this helps somebody.
GLPI 0.72.3 on IIS, Server 2003 Std SP2, PHP 5.3.1, MySQL 5.5
Offline
Pages: 1