As an IT services company, we're are making a proof of concept with Itop so as to verifiy if it can suits our needs (centralzing our customers configuration informations).
We already have an OCS server that collects the servers and PC informations from all of our customer companies. Within OCS, each customer company is associated with a TAG, so as to facilitate grouping by company.
I've installed and configured the OCS Data collecter on the OCS server so as to fill Itop with all those customers servers, PC and VM. It's running well, except that all those objects are imported with a default 'Demo' organization in Itop. The result is that we cannot identify from wich company belong a specific Server or PC after the first massive importation.
I've tried to modifiy the SQL query within the OCS collector configuration files but, since i'm not an SQL expert, my tries failed.
The regarding SQL query is the following:
<ocsservercollector_query>SELECT b.SSN as primary_key,h.ID as
tickets_list, h.NAME as name, h.OSNAME as osfamily_id,h.OSVERSION as
osversion_id, h.PROCESSORT as cpu, h.MEMORY as ram, h.IPADDR as
managementip, b.SMANUFACTURER as brand_id,b.SMODEL as model_id,b.SSN
as serialnumber, '$default_status$' as status, '$default_org_id$' as
org_id FROM hardware AS h JOIN bios AS b ON h.id=b.hardware_id WHERE
b.TYPE COLLATE utf8_general_ci NOT IN ('Notebook','Laptop') AND
SMANUFACTURER COLLATE utf8_general_ci NOT LIKE 'VMware%'</ocsservercollector_query>
The probleme comes from 'default_org_id' that is set on 'Demo' within this same configuration file, resulting in all object populated with 'Demo' in the Itop organization field.
Am I missing something? Does anyone has a clue on how to achieve our goal?
Thank your very much...
CY
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you for trying to help Pierre.
I find the muliple OCS instance solution a bit complicated for the expected result. Even if we do that, we would still have to modify the collector SQL query to check that a specific object belongs to the right organization into OCS before importing it in Itop through a specific collector instance dedicated to this organization.
My hope was to modifiy the SQL query above so as to retrieve the organization attached to an object, and inject it directly into the org_id. Do you think it is not possible?
Thank you
(PS: are you french?)
CY
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
SELECT b.SSN as primary_key,h.ID as ocsid, h.NAME as name, h.OSNAME as osfamily_id,h.OSVERSION as osversion_id, h.PROCESSORT as cpu, h.MEMORY as ram, h.IPADDR as managementip, b.SMANUFACTURER as brand_id,b.SMODEL as model_id,b.SSN as serialnumber, '$default_status$' as status, accountinfo.TAG as orgid FROM hardware AS h JOIN bios AS b ON h.id=b.hardware_id INNER JOIN accountinfo ON accountinfo.HARDWAREID = h.ID WHERE b.TYPE COLLATE utf8_general_ci NOT IN ('Notebook','Laptop') AND SMANUFACTURER COLLATE utf8_general_ci NOT LIKE 'VMware%';
(Changes are cursive)
Last edit: Jochem 2021-03-30
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
As an IT services company, we're are making a proof of concept with Itop so as to verifiy if it can suits our needs (centralzing our customers configuration informations).
We already have an OCS server that collects the servers and PC informations from all of our customer companies. Within OCS, each customer company is associated with a TAG, so as to facilitate grouping by company.
I've installed and configured the OCS Data collecter on the OCS server so as to fill Itop with all those customers servers, PC and VM. It's running well, except that all those objects are imported with a default 'Demo' organization in Itop. The result is that we cannot identify from wich company belong a specific Server or PC after the first massive importation.
I've tried to modifiy the SQL query within the OCS collector configuration files but, since i'm not an SQL expert, my tries failed.
The regarding SQL query is the following:
<ocsservercollector_query>SELECT b.SSN as primary_key,h.ID as
tickets_list, h.NAME as name, h.OSNAME as osfamily_id,h.OSVERSION as
osversion_id, h.PROCESSORT as cpu, h.MEMORY as ram, h.IPADDR as
managementip, b.SMANUFACTURER as brand_id,b.SMODEL as model_id,b.SSN
as serialnumber, '$default_status$' as status, '$default_org_id$' as
org_id FROM hardware AS h JOIN bios AS b ON h.id=b.hardware_id WHERE
b.TYPE COLLATE utf8_general_ci NOT IN ('Notebook','Laptop') AND
SMANUFACTURER COLLATE utf8_general_ci NOT LIKE 'VMware%'</ocsservercollector_query>
The probleme comes from 'default_org_id' that is set on 'Demo' within this same configuration file, resulting in all object populated with 'Demo' in the Itop organization field.
Am I missing something? Does anyone has a clue on how to achieve our goal?
Thank your very much...
CY
Hello,
You might use multiple OCS collector instance, one per Organization, each of them having its specific default_org_id ?
Thank you for trying to help Pierre.
I find the muliple OCS instance solution a bit complicated for the expected result. Even if we do that, we would still have to modify the collector SQL query to check that a specific object belongs to the right organization into OCS before importing it in Itop through a specific collector instance dedicated to this organization.
My hope was to modifiy the SQL query above so as to retrieve the organization attached to an object, and inject it directly into the org_id. Do you think it is not possible?
Thank you
(PS: are you french?)
CY
You can try this:
SELECT b.SSN as primary_key,h.ID as ocsid, h.NAME as name, h.OSNAME as osfamily_id,h.OSVERSION as osversion_id, h.PROCESSORT as cpu, h.MEMORY as ram, h.IPADDR as managementip, b.SMANUFACTURER as brand_id,b.SMODEL as model_id,b.SSN as serialnumber, '$default_status$' as status, accountinfo.TAG as orgid FROM hardware AS h JOIN bios AS b ON h.id=b.hardware_id INNER JOIN accountinfo ON accountinfo.HARDWAREID = h.ID WHERE b.TYPE COLLATE utf8_general_ci NOT IN ('Notebook','Laptop') AND SMANUFACTURER COLLATE utf8_general_ci NOT LIKE 'VMware%';
(Changes are cursive)
Last edit: Jochem 2021-03-30