iTop
How it works​
The Itop provider connects to your Itop server and retrieve data through the itop REST API. The data is refreshed dynamically depending on your choices. Since it gathers a lot of configurations objects from Itop, it puts them in cache. Loging out or waiting 10 hours will flush the cache.

Compatibility​
This integration is (at least) compatible with the following Itop versions:
- 1.4
- 1.3
Feature information​
| Open ticket | Close ticket (from Centreon to iTop) | Handle custom fields |
|---|---|---|
| ✓ | ✓ | ✘ |
Requirements​
You need to configure Open Tickets in order for resources (hosts and services) to receive a ticket number.
Our provider requires the following parameters:
| Parameter | Example of value |
|---|---|
| Address | 10.30.2.22/itop/web |
| API version | 1.4 |
| Username | admin |
| Password | itop |
| Protocol | https |
| Timeout | 60 |
Network flow​
| Source | Destination | Protocol/Port |
|---|---|---|
| Centreon central server | iTop | TCP/443 (https) or TCP/80 (http) |
Account​
You need the following information:
- iTop Address (also known as app token)
- Username
- Password
The aforementioned account must at least be able to open a ticket using the UserRequest class through the API operation core/create.
The connector will also try to access the following classes using the core/get opration depending on the configuration of your open ticket rule:
- Person
- Organization
- Service
- ServiceSubcategory
It will also use the core/update operation when closing a ticket from Centreon.
Some test commands that you can run from your Centreon central server are available in the Test commands section.
Retrieved data​
This open ticket connector can retrieve the following information from your iTop server:
- Caller (Person)
- Organization
- Service
- ServiceSubcategory
If you need more information regarding retrieved data from an open ticket connector, please read the retrieved data chapter from the Open Ticket global documentation.
Additional data​
This open ticket connector can also send the following information when opening a ticket:
- Urgency
- Impact
- Origin
Those information are not retrieved from iTop. They are configured in your open ticket rule as custom lists.
Test commands​
The curl commands listed below must be run from your central server. You need to replace all elements between <> for example <itop_address> may be replaced with my_itop.local.
Get iTop organizations​
curl --location 'https://<itop_address>/webservice/rest.php?version=<api_version>' \
--data 'auth_user=<username>&auth_pwd=<password>&json_data={"operation":"core/get","class":"Organization","key":"SELECT Organization WHERE status=\'active\'","output_fields":"name"}'
Get iTop callers (persons)​
curl --location 'https://<itop_address>/webservice/rest.php?version=<api_version>' \
--data 'auth_user=<username>&auth_pwd=<password>&json_data={"operation":"core/get","class":"Person","key":"SELECT Person WHERE status=\'active\' AND org_id = <org_id>","output_fields":"friendlyname"}'
Get iTop services​
curl --location 'https://<itop_address>/webservice/rest.php?version=<api_version>' \
--data 'auth_user=<username>&auth_pwd=<password>&json_data={"operation":"core/get","class":"Service","key":"SELECT Service WHERE org_id = <org_id>","output_fields":"friendlyname"}'
Get iTop service subcategories​
curl --location 'https://<itop_address>/webservice/rest.php?version=<api_version>' \
--data 'auth_user=<username>&auth_pwd=<password>&json_data={"operation":"core/get","class":"Service","key":"SELECT ServiceSubcategory WHERE service_id = <service_id>","output_fields":"friendlyname"}'
Open a ticket​
Keep in mind that the data in the command below is just an example and your iTop server may ask you to add mandatory data.
curl --location 'https://<itop_address>/webservice/rest.php?version=<api_version>' \
--data 'auth_user=<username>&auth_pwd=<password>&json_data={"operation":"core/create","class":"UserRequest","output_fields":"id","comment":"Opened from Centreon","fields":{"description":"This is a test","title":"this is a test ticket"}}'
Close a ticket​
curl --location 'https://<itop_address>/webservice/rest.php?version=<api_version>' \
--data 'auth_user=<username>&auth_pwd=<password>&json_data={"operation":"core/update","class":"UserRequest","comment":"Closing ticket from Centreon","key":"<ticket_id>","fields":{"status":"closed"}}'