Does anybody know if it's possible (and if so how) to make an oql query that lists all the Virtual Machines that are not linked to any Application Solution?
Much appreciated!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes,
To make it easier, create an audit rule as follows:
Audit Category
Definition Set:
~~~
SELECT FunctionalCI WHERE finalclass LIKE 'VirtualMachine'
~~~
Audit Rule
Query to Run:
~~~
SELECT FunctionalCI AS fci JOIN lnkApplicationSolutionToFunctionalCI AS cfci ON cfci.functionalci_id = fci.id WHERE (finalclass LIKE 'VirtualMachine')
~~~
Valid objects? true
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What do you mean by grouped by ? Like a SQL query, a OQL query will give you a table...
Do you want to generate a webpage to display CI hierarchy ? Give some details of your needs...
To give also some elements : OQL does not implement ORDER BY. Ordering has to be done using the PHP API, so inside a custom module. See the DBObjectSet constructor, $aOrderBy argument.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
thank you very much for your reply,
So i simplify my problem : I want to have ,by SQL or OQL query, the list of all device depends on a rack which the id_rack is passed as parameter to this request
for example:
select ... from ... where .... rack_id= : rack_id
the result is all equipments which depends on this rack : all servers, all chassis, all storage devices , all VM, dbsever, webserver , webapplication, application solution....
like the functionality "depends on" in itop, when I select an application solution --> other actions --> depends on, which list all dependence from this application to device ,
i want to do the same thing but on the Opposite sense so when I select a rack I have all dependence from this rack to application solution
Search on which class rack_id is defined.
If it's on a unique class, that's what you need to select, if it is defined on multiple classes, then use UNION.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Does anybody know if it's possible (and if so how) to make an oql query that lists all the Virtual Machines that are not linked to any Application Solution?
Much appreciated!
Yes,
To make it easier, create an audit rule as follows:
~~~
SELECT FunctionalCI WHERE finalclass LIKE 'VirtualMachine'
~~~
~~~
SELECT FunctionalCI AS fci JOIN lnkApplicationSolutionToFunctionalCI AS cfci ON cfci.functionalci_id = fci.id WHERE (finalclass LIKE 'VirtualMachine')
~~~
Wow perfect!!
Thx :)
hello everybody
please i want to know if its possible to list all application solution grouped by rack and physical device an virtual machine like:
RACK 1
RACK 2
.
.
THAN YOU
Hello,
What do you mean by grouped by ? Like a SQL query, a OQL query will give you a table...
Do you want to generate a webpage to display CI hierarchy ? Give some details of your needs...
To give also some elements : OQL does not implement ORDER BY. Ordering has to be done using the PHP API, so inside a custom module. See the DBObjectSet constructor, $aOrderBy argument.
Hello,
thank you very much for your reply,
So i simplify my problem : I want to have ,by SQL or OQL query, the list of all device depends on a rack which the id_rack is passed as parameter to this request
for example:
select ... from ... where .... rack_id= : rack_id
the result is all equipments which depends on this rack : all servers, all chassis, all storage devices , all VM, dbsever, webserver , webapplication, application solution....
like the functionality "depends on" in itop, when I select an application solution --> other actions --> depends on, which list all dependence from this application to device ,
i want to do the same thing but on the Opposite sense so when I select a rack I have all dependence from this rack to application solution
Last edit: kalil andolsi 2018-03-27
Search on which class rack_id is defined.
If it's on a unique class, that's what you need to select, if it is defined on multiple classes, then use UNION.