jumebv

Bouke Groenescheij

My personal adventures in the quest for virtual perfectness.

  • Home
    Home This is where you can find all the blog posts throughout the site.
  • Categories
    Categories Displays a list of categories from this blog.
  • Tags
    Tags Displays a list of tags that have been used in the blog.
  • Login
    Login Login form

VCOPS: Show all scheduled reports

on
  • Font size: Larger Smaller
  • Hits: 17387
  • 1 Comment
  • Subscribe to this entry
  • Print

The ability to schedule reports in VCOPS is quite cool. Taken from capacity IQ these reports can be run weekly or monthly on a specific time and day of week allowing you to show the report as CSV (to process inside a spreadsheet) or as a readable PDF document. Once SMTP is configured you're able to send the report to multiple users (you, your manager) using comma (,) or semi-column (;) separated e-mail addresses. Also: you can schedule reports on ANY level on ANY object (World, Folder, Datacenter, Cluster, Host, VM, Datastore), and here, the management of all schedules, can become a mess since there is no overview on where schedules are set.

Here is a little query you can run on the UI vm (this is where CapIQ is running).

SELECT R.cmt_repsched_id
  ,O.name
  ,U.username
  ,R.next_scheduled_runtime
  ,RR.recurrence_type
  ,RR.start_hour
FROM cmt_repsched AS R
INNER JOIN cm_objects AS O
  ON R.cmt_object_id = O.object_id
INNER JOIN cmt_user AS U
  ON R.cmt_user_id = U.cmt_user_id
INNER JOIN cmt_report_recurrence AS RR
  ON R.cmt_user_id = RR.cmt_report_recurrence_id;

To run this query do:

- SSH to the UI vm and log in with root
- Run: su - postgres
- Run: psql cmapp
- Copy and paste the above query, this should create a view like this:

This should show all your report schedules, who and on which object it is defined.

Last modified on
Tagged in: How-To technical VCOPS

Comments

  • pariswells Thursday, 11 June 2015

    Thanks for this , so I still couldn't fine the report in the GUI , so here's the command to delete report from MySQL Table!

    DELETE FROM cmt_repsched
    WHERE cmt_repsched_id = 1;

    FYI to get SSH working to copy and paste this query in SSH run this to start the service

    service sshd start

    Then open hosts.allow in (vi /etc/hosts.allow) and add your IP to the ALL: : ALLOW List and remove when you are done!

Leave your comment

Guest Wednesday, 29 March 2017