Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help required with respect to opensearch reporting #1059

Open
adit-cmd opened this issue Dec 24, 2024 · 0 comments
Open

Help required with respect to opensearch reporting #1059

adit-cmd opened this issue Dec 24, 2024 · 0 comments

Comments

@adit-cmd
Copy link

Hi All.. I am fairly new to opensearch reporting and would appreciate your insights on couple of queries I have. Firstly I see the following plugins installed:

sh-5.2$ /usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin list

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

I do see "reportsDashboards" as one of the plugins already installed.

We already have couple of reports created manually through UI. As of now we have to manually download the reports from UI. I am trying to automate the process of downloading the reports programmatically. We are generating a report for a saved_search. So the below curl works and I see the saved_search title in the output.

curl -X GET "http://localhost:5601/api/saved_objects/_find?type=search&fields=title&fields=id&per_page=10&page=1"

Now one of the saved_searches has a report and I want to download that report. The format not necessarily needs to be a CSV file. PDF or PNG should work.

My idea is to download the report using /api/reporting endpoints after finding the report id. However when I try to use the /api/reporting endpoint I get the following response.

sh-5.2$ curl -X GET "http://localhost:5601/api/reporting/_find?per_page=10&page=1" -H "kbn-xsrf: true"
{"statusCode":404,"error":"Not Found","message":"Not Found"}
sh-5.2$

The internet / chatgpt suggests that inorder to interact with the /api/reporting endpoints, I need the reporting plugin. I am confused here. When I listed the above plugins, I saw "reportsDashboards". Is it not the right plugin? Is that plugin only used to perform actions through the UI?

I have also come across few suggestions where the opensearch_dashboard.yml config file has to be updated with the following entries:

opensearch_dashboards.reporting.enabled: true
opensearch_dashboards.reporting.capture.enabled: true

I tried to update the opensearch_dashboard.yml config file with the suggested entries but the dashboard pod fails to come up since it does not recognize the parameters.

Appreciate your help in clearing my doubts and confusion. Also could you suggest the most feasible approach for this? My requirement is to download the reports periodically and store the report in object storage like s3.

I also stumbled upon https://opensearch.org/docs/latest/reporting/rep-cli-index/ and see the following mentioned there:

You can programmatically create dashboard reports in PDF or PNG format with the Reporting CLI without using OpenSearch Dashboards or the Reporting plugin.

What "Reporting plugin" are we talking about here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant