This blog series includes the following posts:
Part 1 – Gathering Custom Performance Counters in OpsMgr
Part 2 – How to create a free disk space report
Part 3 – How to create a processor utilization report for a group of servers
Part 4 – How to create a custom performance counters report for a group of servers
Part 5 – How to make my custom report publicly available
Part 6 – How to schedule my custom report for delivery
Now that we have created our own custom reports it may be useful to schedule them for delivery either to a file share or via email delivery.
How to schedule my custom report for delivery
Scheduling to deliver to a file share:
How do we schedule reports for delivery in OpsMgr? As an example we will show for the built-in report “Most Common Alerts” how it can be scheduled to create a report on a file share and how to then we’ll discuss how to email the report. To schedule this to be created on a file share take the following steps:
1. Prior to running the report create a share (preferably on the reporting server) which allows the user to create files on it, and other users to read the contents of the directory. For our example this is \\reportserver\reports.
2. Run the Most Common Alerts report, go to File / Schedule.
3. For the description we will label it with the name of the report and parameter information which is important to the report. For this example: Most Common Alerts per Week.
4. Under delivery method there should be at least: Report Server File Share, Null Delivery Provider. Choose the Report Server File Share option.
5. On the new fields available on the delivery setting screen specify the name of the file (with an extension), the path to the share, the format to render it in and the user account (with domain) and password to write to the share.
6. Next we create a schedule for when the report runs. In this example we are running it once a week every Monday at 5:02 am.
7. When we created the schedule what actually makes it run? In the SQL Server Agent a new job is created that runs the scheduled report that you created. By default notifications are written to the application event log if the job fails.
8. Next we set the parameters for how the report runs as shown. When generating scheduled reports it is often useful to use the advanced option and specify how many days back the report returns data from (7 days in this case).
9. So how do we know that subscriptions that we have? In Operations Manager console / Reporting / Scheduled Reports. From this screen you can open, edit or cancel the various schedules. If there are issues which occurred when the subscription ran they also will appear on this page.
10. Once the job runs there should be a file in the directory which you specified (\\reportserver\reports in this example).
Scheduling to deliver via email:
So now that we have delivered a report to a file share, how do we deliver via email?
1. To deliver via email a configuration on the reporting server needs to be done.
2. For this example configure a daily email on the “Most Common Alerts” report. With the E-Mail option available now on the list (Report Server E-Mail) configure it with a description and a delivery method.
3. Next for the delivery method we specify who we are going to email it to and then when we want it to occur (once, hourly, daily, weekly or monthly).
4. Set the parameters to yesterday and finish. Set the scheduled report to run in a couple of minutes and validate that it works.
5. To check on the status of this report go back to the reporting section and choose the option to “View Scheduled Reports”.
6. To get it to deliver and be the most readable, the PDF format is recommended when sending the report via email.
7. In the final email, a link to the report is also included so the report can be directly accessed via the reporting server.
More advanced scheduling:
We have used the scheduled email delivery approach to take our own custom reports on processor utilization and have them send an email daily to the server owners so that they can track processor utilization on their systems daily.
We have also used the scheduled email delivery to run on a Sunday morning, for a period of “today –7” through “Yesterday” to cover a Sunday through Saturday server usage report (see below). These reports were generated in word files so that sections could be cut and pasted as inserts into a weekly product team status report.
This series has brought us through the steps to gather our own performance counters, create reports for groups of servers, and deliver them both via a URL for ad-hoc and via scheduled deployments. I hope that this series has shown that the OpsMgr reporting functionality while not as intuitive as I would like it to be is extremely powerful and flexible .