Introduction
This document describes the steps to remove reporting objects associated to a Datasource allowing the Datasource to be removed in Cisco Unified Intelligence Center (CUIC).
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
- Cisco Unified Intelligence Center (CUIC) User interface
- CUIC Command Line Interface (CLI)
Components Used
This document is not restricted to specific software and hardware versions.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
Problem
The Datasource for a retired system cannot be removed from CUIC if it is referenced by other reporting objects.
Solution
Before deleting a Datasource all reporting objects associated with the Datasource need to be deleted.
These queries when run via CLI can be used to identify the Report Definitions, Reports, Dashboards and Schedules linked to the Datasource.
Note: Ensure to take Disaster Recovery System (DRS) backup for CUIC.
- Identify the Datasource with query:
run sql select id, name from cuic_data:cuicdatasource
Find the Datasource name and note the Datasource ID
- Identify the Report Definition IDs associated to the Datasource with query (substitute Datasource ID from prior query):
run sql select id, name from cuic_data:cuicreportdefinition where datasourceid = '<datasource id>'
Note the Report Definitions and Report Definition IDs
- Identify the Reports associated to each Report Definition with query (substitute the Report Definition IDs from prior query):
run sql select id, parentcategoryid, name from cuic_data:cuicreport where reportdefinitionid = '<report definition id>'
Note the Reports and Report IDs
- Identify Widgets in Dashboards that are associated to the Reports with query (substitute the Report IDs from prior query):
run sql select id, name, parentdashboardid from cuic_data:cuicdashboardwidget where url like '%<report id>%'
Note the Parent Dashboard IDs
- Identify each Dashboard the Widgets are associated to with query (substitute the Parent Dashboard IDs from prior query):
run sql select id, name from cuic_data:cuicdashboardwidget where id = '<dashboard id>'
In the CUIC GUI, either remove the Dashboards identified in the query or remove the Widget for the Report from the Dashboard and save
- Identify the Schedules associated to each Report with the query (substitute the Report IDs from prior query in step 3):
run sql select id, scheduledreportname from cuic_data:cuicscheduledreports where reported = '<report id>'
In the CUIC GUI, remove the Schedules identified in the query
- In the CUIC GUI, remove the Reports identified in step 3 and Report Definitions identified in step 2 then remove the Datasource