Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

possible problem? #2

Open
ghost opened this issue Jan 5, 2019 · 7 comments
Open

possible problem? #2

ghost opened this issue Jan 5, 2019 · 7 comments

Comments

@ghost
Copy link

ghost commented Jan 5, 2019

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
Copy link
Member

Hipska commented Jan 5, 2019

What did you put in the "Fields" option?

@ghost
Copy link
Author

ghost commented Jan 6, 2019

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
Copy link
Member

Hipska commented Jan 7, 2019

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
Copy link
Author

ghost commented Jan 11, 2019

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
Copy link
Member

Hipska commented Jan 12, 2019

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

@ghost
Copy link
Author

ghost commented Jan 20, 2019

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
Copy link
Author

ghost commented Jan 20, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant