Delete Scheduled Reports from the VMware Aria Operations database
search cancel

Delete Scheduled Reports from the VMware Aria Operations database

book

Article ID: 338445

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • You receive a scheduled email report from an account that has been deleted.
  • Scheduled reports are being run by an account that has been deleted.
  • Scheduled report is not visible in the UI, but continues to run.


Environment

VMware vRealize Operations 8.3.x
VMware vRealize Operations 8.1.x
VMware vRealize Operations Manager 6.3.x
VMware vRealize Operations 8.10.x
VMware vRealize Operations 8.5.x
VMware vRealize Operations Manager 6.1.x
VMware vRealize Operations Manager 6.7.x
VMware Aria Operations 8.12.x
VMware vRealize Operations Manager 6.6.x
VMware vRealize Operations 8.4.x
VMware vRealize Operations Manager 6.4.x
VMware vRealize Operations 8.6.x
VMware vRealize Operations 8.0.x
VMware vRealize Operations 8.2.x
VMware vRealize Operations 8.x
VMware vRealize Operations Manager 6.2.x
VMware vRealize Operations Manager 7.5.x
VMware vRealize Operations Manager 7.0.x
VMware vRealize Operations Manager 6.5.x

Cause

This issue occurs when a user account with scheduled reports is deleted without removing the schedules reports.

Resolution

Note: Before attempting to run the steps below, try to reclaim the scheduled reports from the Administration > Orphaned Content page.  Content from a deleted user will appear on this page and can be reclaimed by an administrator, and then modified or deleted easily from the UI.

To resolve the issue, remove the scheduled report from the database.

vRealize Operations 8.0 - 8.6.4

  1. Log into the Primary node as root via SSH or console.
  2. Run the following command to log into the Cassandra database:
$VMWARE_PYTHON_BIN $ALIVE_BASE/cassandra/apache-cassandra-*/bin/cqlsh --ssl --cqlshrc $VCOPS_BASE/user/conf/cassandra/cqlshrc
 
  1. Use the select query to view all scheduled reports:
select * from globalpersistence.nce_content_report_schedule_reportschedule;

Note: Use strvalue of the output of the select statement to identify the scheduled report to be deleted.

Example: strvalue from a scheduled report that runs on the cluster level every Monday at 8 AM:
{"com.vmware.statsplatform.persistence.content.report.schedule.ReportSchedule":{"id":"########-####-####-####-########4a91","uniqueKey":"com.vmware.statsplatform.persistence.content.report.schedule.ReportSchedule.########-####-####-####-########4a91","Version":0,"locale":"en","ownerUserId":"########-####-####-####-########8fe3","reportDefinitionId":"########-####-####-####-########8505","resourceRef":{"resourceId":"########-####-####-####-########5b8a","resourceKindKey":{"AdapterKind":"VMWARE", "ResourceKind":"ClusterComputeResource"},"traversalSpecTypeName":"vSphere Hosts and Clusters-VMWARE-vSphere World"},"nextScheduledRuntime":"2016-04-11 15:00:00.0 UTC","recurrence":{"@class":"com.vmware.statsplatform.persistence.content.report.schedule.recurrence.WeeklyRecurrence","timeZoneId":"America/Phoenix",
"startHour":8,"startDate":"2016-04-07 00:00:00.0 UTC","recurrencePeriod":1,"occurDaysOfWeek":[{"com.vmware.statsplatform.persistence.content.report.schedule.recurrence. DayOfWeek":"MONDAY"}]},"lastModificationTimeStamp":
"2016-04-07 22:06:40.501 UTC","sendEmail":false,"emailRecipients":"","privacy":"private","uploadReport":false,"uploadFolder":"","uploadCsvReport":false,
"uploadPdfReport":false}}
  1. Note the uniqueKey value of the scheduled report to be deleted from step 3.
Examplecom.vmware.statsplatform.persistence.content.report.schedule.ReportSchedule.########-####-####-####-########4a91
  1. Run the following command to delete the scheduled report:
delete from globalpersistence.nce_content_report_schedule_reportschedule where namespace='nce_content_report_schedule_reportschedule' and classtype='nce_content_report_schedule_reportschedule' and key= key_value;

Note: Replace key_value with the key value found in step 4.

Example: delete from globalpersistence.nce_content_report_schedule_reportschedule where namespace='nce_content_report_schedule_reportschedule' and classtype='nce_content_report_schedule_reportschedule' and key='com.vmware.statsplatform.persistence.content.report.schedule.ReportSchedule.
########-####-####-####-########4a91';
  1. Type exit to log out.
 

VMware Aria Operations 8.10 and later

  1. Log into the Primary node as root via SSH or console.
  2. Run the following command to switch to the postgres user:
su - postgres
  1. Run the following command to launch the psql utility in the repl DB:
/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -p 5433
  1. Use the select query to view all scheduled reports:
select * from kv_nce_content_report_schedule_reportschedule;

Note: Use strvalue of the output of the select statement to identify the scheduled report to be deleted.

Example: strvalue from a scheduled report that runs on the cluster level every Monday at 8 AM:
{"com.vmware.statsplatform.persistence.content.report.schedule.ReportSchedule":{"id":"########-####-####-####-########4a91","uniqueKey":"com.vmware.statsplatform.persistence.content.report.schedule.ReportSchedule.########-####-####-####-########4a91","Version":0,"locale":"en","ownerUserId":"########-####-####-####-########8fe3","reportDefinitionId":"########-####-####-####-########8505","resourceRef":{"resourceId":"########-####-####-####-########5b8a","resourceKindKey":{"AdapterKind":"VMWARE", "ResourceKind":"ClusterComputeResource"},"traversalSpecTypeName":"vSphere Hosts and Clusters-VMWARE-vSphere World"},"nextScheduledRuntime":"2016-04-11 15:00:00.0 UTC","recurrence":{"@class":"com.vmware.statsplatform.persistence.content.report.schedule.recurrence.WeeklyRecurrence","timeZoneId":"America/Phoenix",
"startHour":8,"startDate":"2016-04-07 00:00:00.0 UTC","recurrencePeriod":1,"occurDaysOfWeek":[{"com.vmware.statsplatform.persistence.content.report.schedule.recurrence. DayOfWeek":"MONDAY"}]},"lastModificationTimeStamp":
"2016-04-07 22:06:40.501 UTC","sendEmail":false,"emailRecipients":"","privacy":"private","uploadReport":false,"uploadFolder":"","uploadCsvReport":false,
"uploadPdfReport":false}}
  1. Note the uniqueKey value of the scheduled report to be deleted from step 3.
Examplecom.vmware.statsplatform.persistence.content.report.schedule.ReportSchedule.########-####-####-####-########4a91
  1. Run the following command to delete the scheduled report:
delete from kv_nce_content_report_schedule_reportschedule where namespace='nce_content_report_schedule_reportschedule' and classtype='nce_content_report_schedule_reportschedule' and key= key_value;

Note: Replace key_value with the key value found in step 4.

Example: delete from kv_nce_content_report_schedule_reportschedule where namespace='nce_content_report_schedule_reportschedule' and classtype='nce_content_report_schedule_reportschedule' and key='com.vmware.statsplatform.persistence.content.report.schedule.ReportSchedule.
########-####-####-####-########4a91';
  1. Type \q to log out.


Additional Information

Run this command to verify the user who has created the scheduled report, but no loner exists:
su - postgres -c "/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -c 'select * from user_name'"

You see the output similar to:
id | name
-------------------------------------+-----------------------------
########-####-####-####-########27ca | maintenanceAdmin
########-####-####-####-########ced7 | VSPHERE.LOCAL\Administrator
########-####-####-####-########d195 | automationAdmin
########-####-####-####-########168f | migrationAdmin
########-####-####-####-########8fe3 | admin
 
Note: The id of the user that created the schedule matches the ownerUserID seen in the strvalue found in step 4 above. If you do not see a matching id then the user has been deleted.