Super-Visions / icingaweb2-module-itop

This module allows you to use an iTop instance as an import source for synchronization in Icinga Director.
https://exchange.icinga.com/Hipska/iTop
7 stars 1 forks source link

possible problem? #2

Open ghost opened 5 years ago

ghost commented 5 years ago

Hi, first of all thanks for the great module. It works with normal SELECT statement without any problems. But I've orblems with some SELECT statements with join.

Task: I need the field name from providercontract and code from organization. I will build some hostgroups.

OQL Statemant: SELECT Organization,ProviderContract FROM ProviderContract JOIN Organization ON ProviderContract.org_id = Organization.id WHERE ProviderContract.status = 'production'

The statemant is working in itop.

When I start the import in itop, I also see the following output in the import process: ProviderContract.name Organization.code 451236 Test1 546321 Test2 987654 Test1

But the preview is emty

Organization ProviderContract

So the sync rule is also emty and nothing is imported.

Any idea?

Best regards GK

Hipska commented 5 years ago

What did you put in the "Fields" option?

ghost commented 5 years ago

Hi,

here are the fields from the icinga director

key field: ProviderContract.name fields: ProviderContract.name,Organization.code

I already tried it with alias and saved a query in itop under query phrasebook. Nothing worked.

Best regards GK

Hipska commented 5 years ago

What version of iTop are you using? And does the user has the REST profile?

Does a simple SELECT query work? I looked to all the code and it seems that everything seems to be ok.

Maybe also check if it works directly with export-v2.php

ghost commented 5 years ago

itop version 2.5.1. Yes, the user as admin an rest profile assiged.

Simple SELECT work perfect.

What what do you mean check if it works directly with export-v2.php?

Hipska commented 5 years ago

Try to reproduce the same query with results by going to the menu "administration" > "export".

ghost commented 5 years ago

sry for delay. I've check some points. Also the "administration" > "export". In itop everything ist working fine. But in icinga director the import source doesn't show a preview and die sync rule is also emty. Only in the tab history you can see the right fields.

idea?

ghost commented 5 years ago

I've extended my tests. It looks like icinga or the module has a problem with the form ProviderContract.name.

If I write all fields in the import source into a normal field without points notation by a modification, the sync rule can process the whole thing.

I hope the analysis helps.