Difference between revisions of "CentOS 7.x Run custom query in iTop"
From Notes_Wiki
(Created page with "<yambe:breadcrumb>CentOS_7.x_itop|CentOS 7.x itop</yambe:breadcrumb> =CentOS 7.x Run custom query in iTop= To run custom query in itop use: # First login as admin user # Go t...") |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x Web Based Tools|Web Based Tools]] > [[CentOS 7.x itop|itop]] > [[CentOS 7.x Run custom query in iTop]] | |||
To run custom query in itop use: | To run custom query in itop use: | ||
Line 15: | Line 14: | ||
# For useful queries you can go to "Admin Tools" -> "Query phrasebook" and then add this custom query. For adding choose appropriate name and description. Enter query as it is in Expression. In Fields type '*'. (Purpose/Usage of Fields in not clear yet). | # For useful queries you can go to "Admin Tools" -> "Query phrasebook" and then add this custom query. For adding choose appropriate name and description. Enter query as it is in Expression. In Fields type '*'. (Purpose/Usage of Fields in not clear yet). | ||
# You can also directly connect to Mariadb backend database. For every object type there is a view_<table-name> view. For example for PC there is view_PC view. This can be queried using normal SQL syntax. | # You can also directly connect to Mariadb backend database. For every object type there is a view_<table-name> view. For example for PC there is view_PC view. This can be queried using normal SQL syntax. | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 7.x]] > [[CentOS 7.x Web Based Tools|Web Based Tools]] > [[CentOS 7.x itop|itop]] > [[CentOS 7.x Run custom query in iTop]] |
Latest revision as of 09:22, 25 August 2022
Home > CentOS > CentOS 7.x > Web Based Tools > itop > CentOS 7.x Run custom query in iTop
To run custom query in itop use:
- First login as admin user
- Go to "Admin Tools" -> "Data Model", here you can see the table name in (). For example for Web Application table name is WebApplication.
- Clicking on the name will give details of various fields in the table
- Go to "Admin Tools" -> "Run Queries".
- You can run queries such as:
- SELECT PC AS pc, WHERE pc.end_of_warranty > NOW() AND pc.end_of_warranty < DATE_ADD(NOW(), INTERVAL 30 DAY)
-
- The above query searches for PCs whose warranty is expiring between today and next 30 days.
- Various other 'Query Examples' are given at top using link at same page. Note that SELECT, WHERE etc. should be in capital. Table names and field names are case sensitive.
- For useful queries you can go to "Admin Tools" -> "Query phrasebook" and then add this custom query. For adding choose appropriate name and description. Enter query as it is in Expression. In Fields type '*'. (Purpose/Usage of Fields in not clear yet).
- You can also directly connect to Mariadb backend database. For every object type there is a view_<table-name> view. For example for PC there is view_PC view. This can be queried using normal SQL syntax.
Home > CentOS > CentOS 7.x > Web Based Tools > itop > CentOS 7.x Run custom query in iTop