What’s new: OpenSearch Reporting CLI

Tue, Feb 14, 2023 · Rupal Mahajan, Joshua Bright, Anirudha Jadhav, Joshua Li, Sayali Gaikawad

The OpenSearch Project is happy to announce the release of the Reporting CLI, making it convenient to generate reports externally without logging in to OpenSearch Dashboards. This gives you the flexibility to programmatically generate reports and connect them to your preferred messaging system. You can now schedule and transport reports efficiently through email.

In this post we’ll show you a few examples of how to leverage the capabilities of the Reporting CLI, such as:

  • Generating a PDF from an eCommerce dashboard that shows data visualizations and scheduling the report to run at a specific time using cron.
  • Incorporating report generation into your workflow with email or notifications.
  • Generating a CSV report from tabular data in the Dashboards Discover application.

What is the Reporting CLI?

The Reporting CLI is a package you can install separately from the Reporting plugin that allows you to specify an OpenSearch Dashboards Discover URL and generate a report in PDF or PNG format. You can download reports you generate locally or send reports programmatically to downstream messaging systems. You can also leverage the capabilities of the Reporting CLI to email CSV reports, but that requires the Reporting plugin.

What can you do with the Reporting CLI?

The Reporting CLI can save you time by automating report generation and distribution across messaging systems and provides access to the report data through several authentication options.

If you want more flexibility in how you can distribute reports throughout your organization through multiple messaging systems, such as Slack or SES email systems, you can conveniently schedule and deliver those Dashboard Discover reports with the Reporting CLI.

If you want to use an AWS service event to trigger a report, you can configure a trigger using AWS Lambda.

Example: Generating a PDF from a dashboard

You can generate an eCommerce revenue dashboard PDF report that shows all of the data visualizations and schedule the report to run at a specific day and time with the cron utility, as shown in the following image.

Image: An example Dashboard visualization PDF

Example: Using advanced options to add the Reporting CLI to your workflow

The Reporting CLI allows engineers and builders to configure and connect their generated reports to messaging systems by specifying advanced CLI options. Out of the box, the Reporting CLI will download the report locally, but the following options will allow you to send the report to someone:

Example: Generating a CSV report from tabular data

If you have tabular data in a Discover view, you can generate a CSV report to capture all the data and send it to stakeholders, as shown in the following image. This is the one instance that requires you to log in to OpenSearch Dashboards and use the Reporting plugin.

Image: An example tabular Dashboard to create a CSV report


We encourage you to try out the Reporting CLI and let us know what you think. How do you incorporate the Reporting CLI into your workflows? We would love to hear from you on the OpenSearch community forum. If you encounter any challenges with this feature, please let us know by creating a GitHub issue.

To get started with the Reporting CLI, see Creating reports with the Reporting CLI in the OpenSearch documentation.