Giter Club home page Giter Club logo

reporting's Introduction

OpenSearch Dashboards Reports

OpenSearch Dashboards Reports allows ‘Report Owner’ (engineers, including but not limited to developers, DevOps, IT Engineer, and IT admin) export and share reports from OpenSearch Dashboards dashboards, saved search, alerts and visualizations. It helps automate the process of scheduling reports on an on-demand or a periodical basis (on cron schedules as well). Further, it also automates the process of exporting and sharing reports triggered for various alerts. The feature is present in the Dashboard, Discover, and Visualization tabs. We are currently working on integrating Dashboards Reports with Notifications to enable sharing functionality. After the support is introduced, scheduled reports can be sent to (shared with) self or various stakeholders within the organization. These stakeholders include but are not limited to, executives, managers, engineers (developers, DevOps, IT Engineer) in the form of pdf, hyperlinks, csv, excel via various channels such as email, Slack, and Amazon Chime. However, in order to export, schedule and share reports, report owners should have the necessary permissions as defined under Roles and Privileges.

Code Summary

Reports-Scheduler

Test and build Observability OpenSearch Build CI
Code coverage codecov
Distribution build tests OpenSearch IT tests OpenSearch IT code
Backward compatibility tests BWC tests

Repository Checks

DCO Checker Developer certificate of origin
Link Checker Link Checker

Issues

good first issues open
features open
enhancements open
bugs open
untriaged open
nolabel open

Documentation & Forum

Please see our technical documentation to learn more about its features. For additional help with the plugin, including questions about opening an issue, try the OpenSearch Forum.

Contributing

We welcome you to get involved in development, documentation, testing the OpenSearch Dashboards reports plugin. See our CONTRIBUTING.md and join in.

Notifications Integration

OpenSearch Dashboards Reports integration with Notifications is currently in progress. Tracking here

Code of Conduct

This project has adopted the Amazon Open Source Code of Conduct. For more information see the Code of Conduct FAQ, or contact [email protected] with any additional questions or comments.

Security

If you discover a potential security issue in this project we ask that you notify OpenSearch Security directly via email to [email protected]. Please do not create a public GitHub issue.

License

See the LICENSE file for our project's licensing. We will ask you to confirm the licensing of your contribution.

Copyright

reporting's People

Contributors

abbashus avatar akbhatta avatar anirudha avatar carlmeadows avatar darshitchanpura avatar davidcui1225 avatar dblock avatar dependabot[bot] avatar derek-ho avatar gaiksaya avatar joshuali925 avatar kavilla avatar kavithacm avatar kgcreative avatar mengweieric avatar opensearch-trigger-bot[bot] avatar peterzhuamazon avatar prudhvigodithi avatar ps48 avatar rupal-bq avatar seankao-az avatar sejli avatar seraphjiang avatar sumukhswamy avatar tengda-he avatar uzhinskiy avatar vachashah avatar vamsi-amazon avatar zhongnansu avatar zhyuanqi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reporting's Issues

[BUG] Wrong results for CSV reports with "is one of" filter

Describe the bug
PR: #33

  • Save a saved search in discover that uses is one of filter. If only one item is added in the filter, server crashes:
server    log   [18:37:58.412] [error][opendistroReportsKibana][plugins] Failed to generate report: Error: Query string is required for full text query!
server    log   [18:37:58.413] [error][opendistroReportsKibana][plugins] Error: Query string is required for full text query!
    at MatchPhraseQuery.toJSON (/Users/lijshu/Projects/7.10.2/kibana/.kibana-reports/kibana-reports/node_modules/elastic-builder/lib/queries/full-text-queries/mono-field-query-base.js:88:23)
...
  • If there are multiple items in a negated is one of filter, csv report is inconsistent with discover results since filters are not handled correctly

To Reproduce

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Support for Powerpoint Reports from Kibana Dashboards

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.


Hello,

Kibana dashboards when used with customers over API health metrics, often after the workshop customers expect a report. If user can download one's visualizations as powerpoint presentation with graphs backed by actual data. It empowers user to tweak the scale of data, change legends etc before sending the report to the stakeholders. It would be a powerful feature to include powerpoint plugin in Kibana reports

This issue is submitted by @sammad
opendistro-for-elasticsearch/kibana-reports#31

[BUG] Cannot download as CSV when Store URLs in session storage is active

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


When Store URLs in session storage option is set in Advanced Settings, cannot download saved query as CSV.
Js errors is thrown :
Uncaught TypeError: Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method. at _nonIterableRest (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at _slicedToArray (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at getTimeFieldsFromUrl (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at contextMenuCreateReportDefinition (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at HTMLButtonElement.<anonymous> (:5601/36136/bundles/plugin/opendistroReportsKibana/opendistroReportsKibana.plugin.js:1) at HTMLDocument.dispatch (:5601/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:404) at HTMLDocument.m.handle (:5601/36136/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:404)

getTimeFieldsFromUrl function is waiting for a timestamp in the url which is not present when Store URLs in session storage is active

This issue is submitted by @mxmorin
opendistro-for-elasticsearch/kibana-reports#343

[BUG] Reporting indicies are configured with no replicas

Describe the bug
in report-definitions-settings.yml and report-instances-settings.yml, number_of_replicas set to 0 with auto_expand_replicas: "0-1". In certain circumstances if master node goes out of network, there is a possibility that there are no replica nodes to replace it.

May be we can set to at least 1 replica available always?

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[BUG] Adding unicode or emoji to header or footer doesn't render.

Describe the bug
Unicode entered as markdown content is rendered as empty rectangles in resulting PDF.

To Reproduce
Steps to reproduce the behavior:

  1. Create a report
  2. Add visualization, etc.
  3. Click "add header"
  4. In the header add some emoji or high unicode (I used "🤷‍♂️ m̩ n̩ l̩ 🤦‍♂️") - they show up properly in the "preview"
  5. Download the report and see the empty rectangles (see screen shot)

Expected behavior
Character render properly as in preview

Plugins
All OpenSearch plugins

Screenshots
Screen Shot 2021-06-03 at 3 33 31 PM

Host/Environment (please complete the following information):

  • OS: MacOs
  • Version Chrome / 90.0.4430.212 (Official Build) (x86_64)
  • OpenSearch 1.0-RC1

Ensure reports-scheduler and dashboards-reports backwards compatibility with ODFE

Coming from opensearch-plugins#12, enable upgrade to OpenSearch, while supporting backward compatibility.

  • Rename Namespaces (e.g. com.amazon.opendistroforelasticsearch to org.opensearch)
  • Rename Classes, Methods, Variables
  • Rename Remaining Identifiers (e.g. Opendistro to OpenSearch).
  • Rename, and Backwards Compatibility for Rest APIs
  • Rename, and Backwards Compatibility for Settings
  • Rename, and Backwards Compatibility for Indices
  • Run in a backwards compatible way on top of OpenSearch 1.0 that has joined an ES 7.10.x cluster
  • Run in a backwards compatible way on top of OpenSearch 1.0 that has joined an ODFE 1.13.x cluster
  • Drop in replacement for the Opendistro version 1.13 of the plugin

[BUG] Reporting behind Reverse Proxy doesn't work

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


I can't generate any reports and I believe it has to do with the reverse Proxy setting. The headless chrome that launches isn't communicating back through the proxy port and or path. There doesn't seem to be a setting specific to the kibana report like there is for the main kibana setting from elasticsearch.

Is there a method to get this to work right now on a reverse proxy?

Thanks!

This issue was submitted by @ky-ma
opendistro-for-elasticsearch/kibana-reports#332

[BUG] doc[field] == null causing error in CSV report

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


Version

Opendistro Elasticsearch 1.13.0 standalone linux
Opendistro Kibana 1.13.0 standalone linux

Error description

If the saved discover table includes a null value the csv export will fail with the error message:

[08:16:09.781] [error][opendistroReportsKibana][plugins] Failed to generate report: TypeError: Cannot read property 'toString' of null
  log   [08:16:09.782] [error][opendistroReportsKibana][plugins] TypeError: Cannot read property 'toString' of null
    at sanitize (/srv/opendistroforelasticsearch-kibana/plugins/opendistroReportsKibana/server/routes/utils/dataReportHelpers.ts:227:18)
    at getEsData (/srv/opendistroforelasticsearch-kibana/plugins/opendistroReportsKibana/server/routes/utils/dataReportHelpers.ts:172:34)
    at convertEsDataToCsv (/srv/opendistroforelasticsearch-kibana/plugins/opendistroReportsKibana/server/routes/utils/savedSearchReportHelper.ts:266:18)
    at generateReportData (/srv/opendistroforelasticsearch-kibana/plugins/opendistroReportsKibana/server/routes/utils/savedSearchReportHelper.ts:151:10)
    at process._tickCallback (internal/process/next_tick.js:68:7)
 error  [08:16:07.104]  Error: Internal Server Error
    at HapiResponseAdapter.toError (/srv/opendistroforelasticsearch-kibana/src/core/server/http/router/response_adapter.js:132:19)
    at HapiResponseAdapter.toHapiResponse (/srv/opendistroforelasticsearch-kibana/src/core/server/http/router/response_adapter.js:86:19)
    at HapiResponseAdapter.handle (/srv/opendistroforelasticsearch-kibana/src/core/server/http/router/response_adapter.js:81:17)
    at Router.handle (/srv/opendistroforelasticsearch-kibana/src/core/server/http/router/router.js:164:34)
    at process._tickCallback (internal/process/next_tick.js:68:7)

This issue is submitted by @Artain
opendistro-for-elasticsearch/kibana-reports#327

[BUG] Saved search filter types are not fully supported when creating csv report

Missing the following filters

  • range => Fixed in #185
  • geo -> no need to fix, as it's not able to add filters on geo fields
  • query_string => #207

Some filters will not be recognized and parsed by csv reporting module and couldn't generate correct report, with filtered data.
e.g. range filter

  • a example meta filter field of a saved search
"filter":[{"meta":{"params":{"gte":3,"lt":5},"alias":null,"negate":false,"disabled":false,"type":"range","key":"total_quantity","indexRefName":"kibanaSavedObjectMeta.searchSourceJSON.filter[0].meta.index"},"range":{"total_quantity":{"gte":3,"lt":5}},"$state":{"store":"appState"}}

To Reproduce
Steps to reproduce the behavior:

  1. add sample e-commerce dataset
  2. go to Discover page and add a filter of "total_quantity" is between "3" to "5"
  3. save it
  4. create csv report

Expected behavior

Plugins
Reporting

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[BUG] Double sorting in saved search cause csv report failure

Describe the bug
When saved search is saved with double sorting, the logic fails to genereate csv. Single sorting doesn't have any issue though.

  • Error message
{"statusCode":500,"error":"Internal Server Error","message":"_order.toLowerCase is not a function"}

To Reproduce
Steps to reproduce the behavior:

  1. open a saved search in Discover
  2. Add double sorting on 2 fields
  3. save that search again

Expected behavior
report being generaeted with corrrect sorting

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

reporting bug fixes

This is an Epic for Track bug fixes in reporting.
[BUG] Missing fields in the csv report -> dashboards-reports #43

[BUG] doc[field] == null causing error in CSV reportdashboards-reports #40

[BUG] Time Range not using Commonly Used Ranges from Kibana Settings -> dashboards-reports #41

[BUG] Table rendering is truncated in pdf/png exports -> dashboards-reports opensearch-project/dashboards-reporting#61

[Query Builder] Correctly handle match phrases when a single value is specified or when the match phrases is negated -> dashboards-reports #33

[BUG]Negative values not exported correctly -> dashboards-reports #20

Use dashboards settings in report configurations

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


Currently, the time_range component uses a constant from report_settings_constants.tsx to feed the commonlyUsedRanges property of EuiSuperDatePicker inside it.

This is not the default behavior across Kibana. The default behavior is to load this from uiSettings service, allowing the user to override the available options.

I'm proposing this change that is not a breaking change but a "fix" that makes this plugin follow the default behavior across Kibana.

This issue was originally submitted by @iget-master
opendistro-for-elasticsearch/kibana-reports#351

[BUG] reverse proxy rewrite rules break pdf/png report generation

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


The current default behaviour for kibana (due to change with version 8), is that if you configure the server.basepath, then you also need to configure your reverse proxy to rewrite the url to remove the basepath.
This behaviour is configurable from 6.3 (via server.rewriteBasePath) but the default behaviour still assumes the proxy is rewriting the url.

(quote from the 5.6 docs as they do a better job of explaining it than later versions)

server.basePath:
    Enables you to specify a path to mount Kibana at if you are running behind a proxy. This only affects the URLs generated by Kibana, your proxy is expected to remove the basePath value before forwarding requests to Kibana.

opendistro-for-elasticsearch/kibana-reports#313 works only if the server.rewriteBasePath is set to true, which isn't the default configuration

Otherwise chromium makes a request to http://0:5601/basepath/app/visualize... and gets a 404.

This issue is submitted by @ccottam
opendistro-for-elasticsearch/kibana-reports#333

[BUG] Large csv report will throw error

Describe the bug
Adding xpack.reporting.csv.maxSizeBytes to kibana.yml fails to load because it's an unrecognized key.

Please add this to next release so we can increase the size of the CSV file in the reports.

Error
{"type":"log","@timestamp":"2021-06-04T21:19:35Z","tags":["fatal","root"],"pid":7733,"message":"{ Error: Unknown configuration key(s): "xpack.reporting.csv.maxSizeBytes". Check for spelling errors and ensure that expected plugins are installed.\n at ensureValidConfiguration (/usr/share/kibana/src/core/server/legacy/config/ensure_valid_configuration.js:42:11) code: 'InvalidConfig', processExitCode: 64, cause: undefined }

To Reproduce
Steps to reproduce the behavior:

  1. Create Index over 100MB
  2. Create Report on that index to pull the data
  3. Generate CSV file
  4. View the spreadsheet and it will not show all 100MBs of data.

Expected behavior
Adding this to kibana.yml should allow the complete download.
xpack.reporting.csv.maxSizeBytes = 1000000000

Plugins
Please list all plugins currently enabled.

Screenshots
None
Host/Environment (please complete the following information):

  • ubuntu 20.04.2
  • Kibana Version 7.10.2

Standardize branching to match OpenSearch

Coming from .github#13, standardize release branching to match what OpenSearch is doing.

  1. Create a 1.0 branch for the OpenSearch 1.0 release, 1.x branch for next 1.1 release, and use main for 2.0 development. Make sure CI is enabled on those.
  2. Update your release/branching documentation. If you don't have one, add a RELEASING.md that links to, or has content from .github/RELEASING.md.
  3. If you are using a develop branch, stop. You should be using the default main brach for furthermost, future development.
  4. Delete any merged/stale/develop/feature branches that are no longer in use.
  5. Communicate any changes in process to your team.

Refer to release branching for more information.

[BUG] VisualReportHelper unit test is failing

Describe the bug
visualReportsHelper unit test is failing because we are using elastic demo url in unit test for reporting module to access and gernerate report.

Recently they change the html identifier from "#dashboardsViewport" to ".dashboardViewport".

Solution:
We should remove this dependency on elastic. Using a html locally and let pupeeter renders it is a better option

reference: https://stackoverflow.com/questions/65417870/how-to-mock-remote-website-responses-to-unit-test-puppeteer-code-with-jest

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Report generation & Download API : Option to Export CSV by POST URL

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.


Would be great to allow for a more programmatic csv export of tables. same/similar as: https://www.elastic.co/guide/en/kibana/current/automating-report-generation.html

This issue is submitted by @mrkobk
opendistro-for-elasticsearch/kibana-reports#238

[BUG] Creating a report in PDF then later change it to PNG doesn't seem to 'stick'

Describe the bug
A report created as a PDF type then executed, later changed to a PNG will always stay a PDF

To Reproduce
Steps to reproduce the behavior:

  1. Create a report of type PDF
  2. Download the report
  3. Change the report definition to PNG, save the definition
  4. Try to re-download the report - it will always be PDF

Expected behavior
Report format changes

Plugins
All OpenSearch

Host/Environment (please complete the following information):

  • OS: MacOS
  • Version: Chrome / Version 90.0.4430.212 (Official Build) (x86_64)
  • OpenSearch 1.0-RC1

Pluggable report engines and (Xe)LaTeX reports for grumpy guys with air-gapped clusters

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.


There are some clusters out there created only for anomaly monitoring and bad news delivery. You could find such deployments in one of those labs with one of those fancy particle accelerators or any other modern lab filed with hipsters.

Some of administrators who runs such kind of systems dream of one simple thing. (Xe)LaTeX one report template and read it every morning for the next decade.
Unfortunately, (as far as i can see) proposed model is missing couple of abstraction layers for such kind of reports, so my question is...

Any chances?

P.S. sorry for ugly pic
data_model

This issue is submitted by @devopsotrator
opendistro-for-elasticsearch/kibana-reports#12

[BUG] Reports set with a floating point number trigger frequency are rounded without input

Describe the bug
A non whole number value on a report trigger frequency results in frequency dropped to 0.

To Reproduce
Steps to reproduce the behavior:

  1. Create a report
  2. Go to "report trigger"
  3. select "schedule"
  4. select "recurring"
  5. select "frequency - by interval"
  6. enter 0.5 for "every" and "hour"
  7. click "create"

When you view the report definition, it will show "By interval, every 0 hours"

Expected behavior
When you view the report definition, it will show "By interval, every 0.5 hours" or "By interval, every 30 minutes"

Plugins
All OpenSearch plugins

Host/Environment (please complete the following information):

  • OS: MacOS
  • Version: Chrome Version 90.0.4430.212 (Official Build) (x86_64)
  • OpenSearch 1.0 RC-1

Better and cleaner report on visualization

Is your feature request related to a problem? Please describe.
pdf report contains un-related buttons, filter options(visualization page)

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context

image

[BUG] For csv report, if choose "Today" for time range, it fails to generate report

Describe the bug
In Discover, if choose "Today" for time range, csv report couldn't generate. The request will not even be successfully sent to backend for execution.

  • Error log in browser

    context_menu_helpers.js:47 Uncaught TypeError: Cannot read property 'diff' of undefined
        at getTimeFieldsFromUrl (context_menu_helpers.js:47)
        at HTMLButtonElement.<anonymous> (context_menu.js:163)
        at HTMLDocument.dispatch (jquery.js:5429)
        at HTMLDocument.elemData.handle (jquery.js:5233)
    
  • Root Cause
    If set to "Today", we fail to get time range from url, becuase in the time field of url, it will be

    ....time:(from:now%2Fd,to:now%2Fd))...
    
  • Comparing to for example "Last 24 hours"

    time:(from:now-24h,to:now)
    

The logic actually converting start and end time to absolute data and time, then calculate the math diff and use as timeduration in ISO format. But for Today case, the converted time range will be same for start and end.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[BUG] pdf timeout in bad internet environment

Describe the bug
pdf timeout in bad internet environment

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[BUG] Missing fields in the csv report

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


I am trying to create a CSV report based on a saved search that contains fields like @timestamp, A, B, C.D, C.E, F, etc. But the generated file only contains @timestamp, A, B, F - in the report all complex fields are missing.
In fact - the fields that mapped as object in my index are missed.
Why did this happen and how can I fix it?

Kibana v 7.10.0 from docker-image "amazon/opendistro-for-elasticsearch-kibana:1.12.0"

For example:

   {
        "_index" : "my_index",
        "_type" : "_doc",
        "_id" : "789be064-0758-4245-8ca1-6570df3bb5a7",
        "_score" : 1.0,
        "_source" : {
          "status" : "alert",     -   simple field = string
          "issue_uid" : 123,   -   simple field = number
          "created_at" : "2020-09-21T05:02:48.000+03:00",    -   simple field = date
          "alerts_count" : 2,   -   simple field = number
          "labels" : {       -   complex field = object 
            "kubernetes" : "cluster.k8s",    -  part of complex field  -  will be missed from CSV-report
            "statefulset" : "sts1"  -  part of complex field  -  will be missed from CSV-report
          }
        }
    }

This issue is submitted by @uzhinskiy
opendistro-for-elasticsearch/kibana-reports#363

Improve PDF report quality

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.


I'm testing the PDF reporting functionality (my main reason to migrate to Opendistro) when I noticed that the generated PDF is just a screenshot of the page instead of a vector/text PDF. Also there's a issue with some fonts with wrong kerning.

I've reading the code and doing some tests, and looks viable to remove the screenshot part of the code:

https://github.com/opendistro-for-elasticsearch/kibana-reports/blob/98750bee4fcf64b1c4505d9f39e8b5908a95de3a/kibana-reports/server/routes/utils/visual_report/visualReportHelper.ts#L170-L177

So the quality is restored, but the font kerning issue persists. Doing some research, found this issue on puppeteer that suggests adding --font-render-hinting=none to args solves the problem. I did tested here, and the result is a perfect PDF.

Note that since the removed piece of code is responsible for adding the header and footer to the report, we need to rewrite the composeReportHtml to modify the original html instead of creating a new one.

I'm working on a pull request to solve this issue, but would be great to hear from someone that wrote the screenshot part the reasons for it.

This issue is originally submitted by @iget-master
opendistro-for-elasticsearch/kibana-reports#350

[BUG] Time Range not working properly with relative dates

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


Steps to reproduce:

  1. Create a report definition
  2. On time range field, use relative ranges eg. "from 7 days ago (round)" and "to now".
  3. Save the report definition
  4. Reopen it a minute later

Note that since internally the KibanaReports plugin converts the range field from elasticsearch DateMath to ISO duration, it is not able to do some things, for example the "round" option won't work properly.

Since I'm working on a lot of issues that I found on this plugin, reading the code I noticed that it don't use DateMath to store the time range of the report. This makes no sense because ISO duration will not be able to represent the same range selected on the default EuiSuperDatePicker.

I really see no reason for not using DateMath to store the range:

{
  from: "now/d-7d",
  to: "now"
}

This issue was originally submitted by @iget-master
opendistro-for-elasticsearch/kibana-reports#353

Adding i18n translations

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.


Hi,
From what I see in the code most strings are hardcoded in english. Is there any ongoing work to add i18n translation support to this plugin?
If I were to do this myself, completely or partially (ie. just critical user-facing parts), can I submit a pull request? Aside from general contribution guidelines, is there anything I should be aware of when trying to implement that?

**This issue is submitted by @starcatter **
opendistro-for-elasticsearch/kibana-reports#348

[BUG] Cypress test failures

Describe the bug

  • Create scheduled report definition failure: the test fails
  • Create on-demand report defintion failure: the test can pass but never create a report instance, which will lead to the failure of download from report table test in download.spec

To Reproduce
Steps to reproduce the behavior:

  1. spin up Opensearch and Dashboards with reporting installed on both
  2. yarn cypress:run
  3. check test reports

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[BUG]Negative values not exported correctly

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.


Issue occurred when generating CSV file from a table in Discover. Negative numbers appear in the csv with an extra ' in front of them. This is what it looks like:

Negative value Positive value
'-47 520
'-15 475

For reference, this field is of type number

This issue is submitted by @melvinkokxw
opendistro-for-elasticsearch/kibana-reports#344

security_tenant and embed parameteres are mutually exclusive

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.


Hi

In my application, I embed Kibana dashboards and other pages in iframes.

In order to select tenant, we add security_tenant parameter to the url (before the # anchor)
To embed the Kibana page (remove the upper and leftside menus), we use embed=true (after the # anchor)

Each of those parameters works separately, but when we put them together the embed parameter is not working

Here is a sample of url in iframe

https://kibana_host:443/app/opendistro_kibana_reports?security_tenant=my-tenant#/?embed=true

This issue is submitted by @WassimDhib
opendistro-for-elasticsearch/kibana-reports#279

Generating CSV doesn’t include seconds and seconds fractions

Is your feature request related to a problem? Please describe.
Currently for the date field in csv report. In the code there are 2 steps to handle date value.

  1. during data query stage, we added a format: date_hour_mintue as docValue(e.g. yyyy-MM-dd'T'HH:mm)
    https://github.com/opensearch-project/dashboards-reports/blob/e5174537800c60b1bf3145a80c4a36ab4227b80b/dashboards-reports/server/routes/utils/savedSearchReportHelper.ts#L270
  2. During csv rendering stage, we use moment.js to format it into 'MM/DD/YYYY h:mm:ss a', (e.g. 06/27/2021 9:59:00 pm)
    https://github.com/opensearch-project/dashboards-reports/blob/e5174537800c60b1bf3145a80c4a36ab4227b80b/dashboards-reports/server/routes/utils/dataReportHelpers.ts#L173-L175
    https://github.com/opensearch-project/dashboards-reports/blob/e5174537800c60b1bf3145a80c4a36ab4227b80b/dashboards-reports/server/routes/utils/constants.ts#L67

Notice is the first step above, we are cutting off the seconds and seconds fractions, comparing with what seems like the default date field format in advanced UI setting. And in step 2, the seconds fields will always be 00, becuase of the cut off in step 1.
image

Describe the solution you'd like
maybe cutting off seconds for date field is not a good choice. We have the following format as available options. Maybe we should use date_hour_mintue_seconds or date_hour_minute_second_fraction

Describe alternatives you've considered
Retrieve date format setting from Advanced UI setting and use that, but I feel like this will not only apply to date format, but also other settings, such as csv seperator, timezone, url prefix, etc. It's better to add it as a compete feature to support advanced UI setting loading

Additional context
This issue was originally raised from Opensearch forum https://discuss.opendistrocommunity.dev/t/generating-csv-doesnt-include-seconds-on-timestemp-fields/6413/6

[BUG] Fail to generate report for dashboards/visualizations with hashed url

Describe the bug
Currently pdf/png report is based on url, but it failed to handle the hashed url case.

  • example for regular url
https://demo.elastic.co/app/dashboards#/view/welcome_dashboard?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(description:'Main%20landing%20page%20for%20Elastic%20Demo%20Gallery;%20a%20good%20reset%20point%20if%20you%20get%20lost.',filters:!(),fullScreenMode:!f,options:(darkTheme:!f,hidePanelTitles:!f,useMargins:!t),query:(language:kuery,query:''),timeRestore:!f,title:'Welcome%20Dashboard',viewMode:view)
  • example for hashed url
https://www.xxx.com/app/discover#/view/05959b70-9621-11eb-bdf0-ef859c96e685?_g=h@c823129&_a=h@8896bf6

but Dashboards enababled url hashing when there's multiple state.
https://github.com/opensearch-project/OpenSearch-Dashboards/blob/main/src/plugins/opensearch_dashboards_utils/public/state_management/url/hash_unhash_url.test.ts#L109

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
able to create pdf/png

Plugins
Please list all plugins currently enabled.

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

[BUG] Exporting a big file (>50MB) produces a V8 memory heap error

Describe the bug
When a report is generated containing a lot of document then the Javascript v8 engine might suffers from a heap out of memory exception and crash.

I believe that it is caused by the fact that the export process keeps all content that should be exported in memory before writing all at once into the CSV file.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Discover'
  2. Select a lot of documents and do not specify the columns that should be exported
  3. Click on 'Generate CSV'
  4. The dashboard application should crash

Expected behavior
Their should be almost no limit to the size of the exported CSV file and it should be possible to generate CSV file way bigger than the memory allocated to the Javascript heap.

Example of a trace

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

<--- Last few GCs --->

[1:0x41f1b90]  1220660 ms: Mark-sweep 786.3 (1233.8) -> 786.3 (1157.3) MB, 218.8 / 0.0 ms  (average mu = 0.853, current mu = 0.000) last resort GC in old space requested
[1:0x41f1b90]  1221123 ms: Mark-sweep 786.3 (1157.3) -> 786.3 (1116.8) MB, 462.8 / 0.0 ms  (average mu = 0.630, current mu = 0.000) last resort GC in old space requested


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x16ab3e6dbf1d]
Security context: 0x3a9704a9e6c1 <JSObject>
    1: DoJoin(aka DoJoin) [0x3a9704a85e69] [native array.js:~87] [pc=0x16ab3eace969](this=0x07a6e6d826f1 <undefined>,l=0x0a2acd302271 <JSArray[10000]>,m=10000,A=0x07a6e6d828c9 <true>,w=0x0a66bb934901 <String[1]\: \n>,v=0x07a6e6d829a1 <false>)
    2: Join(aka Join) [0x3a9704a85eb9] [native array.js:~112] [pc=0x16ab3eaaa4b8](this=0x07a6e6d826f1 <undefined>,l=0...

 1: 0x8fb090 node::Abort() [/usr/share/kibana/bin/../node/bin/node]
 2: 0x8fb0dc  [/usr/share/kibana/bin/../node/bin/node]
 3: 0xb0336e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/share/kibana/bin/../node/bin/node]
 4: 0xb035a4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/share/kibana/bin/../node/bin/node]
 5: 0xef7602  [/usr/share/kibana/bin/../node/bin/node]
 6: 0xf06e1f v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/share/kibana/bin/../node/bin/node]
 7: 0xed69cb v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/usr/share/kibana/bin/../node/bin/node]
 8: 0x11c5768 v8::internal::Runtime_StringBuilderJoin(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/share/kibana/bin/../node/bin/node]
 9: 0x16ab3e6dbf1d 

Host/Environment (please complete the following information):

  • OS: Ubuntu
  • Version: 20.10
  • Docker version : 19.03.23
  • Docker image : amazon/opendistro-for-elasticsearch-kibana:1.13.2

Support sending compiled report over email/slack

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

We use this plugin to generate a daily PDF of the health status of our backend services. It would be great if these reports could be automatically sent to relevant stakeholders over email or slack etc.

This issue is submitted by @ThisIsQasim
opendistro-for-elasticsearch/kibana-reports#339

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.