- 3,734,238 Users
- 2,246,919 Discussions
- 7,857,196 Comments
- 17.8K All Categories
- 3.3K Industry Applications
- 3.2K Intelligent Advisor
- 57 Insurance
- 533.2K On-Premises Infrastructure
- 137.3K Analytics Software
- 38.5K Application Development Software
- 5.1K Cloud Platform
- 109K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 70.7K Infrastructure Software
- 105K Integration
- 41.5K Security Software
OEM 13.4 & Grafana: get metrics from different target type than selected
I want to create some dashboards for our developers so they don't have to ask us DBAs how the DB is doing. Unfortunately most of the useful performance metrics belong to target type "oracle_database" but our devs know only the PDBs which their applications are using and don't necessarely know to which DB instance the PDB belongs.
So what I'm trying to do is to let the devs choose a target_name from a list of target_type = 'oracle_pdb' and then present some panels with metrics belonging to target_type = 'oracle_database' from the instance on which the selected PDB is running.
For example with this query (custom/repository) I can display the I/O mbs of the CDB on which the selected PDB is running:
SELECT COLLECTION_TIMESTAMP as time_sec, value as value, metric_column as metric FROM sysman.mgmt$metric_details WHERE target_name = (SELECT member_target_name from mgmt$target_members WHERE aggregate_target_guid = (SELECT aggregate_target_guid FROM mgmt$target_members WHERE member_target_name = $oem_gf_target_name AND member_target_type = 'oracle_pdb' AND aggregate_target_type = 'rac_database') AND member_target_type = 'oracle_database') AND metric_column = 'iombs_ps' ORDER BY COLLECTION_TIMESTAMP ASC;
The problem with this query is that it allows only for one selected target. What do I need to change to be able to select multiple PDBs from different CDBs and have a line displayed for each CDB? I tried changing "WHERE ... =" into "WHERE ... IN" but it still shows only one line in the panel.
Any help is much appreciated ;)