Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

In order to use this feature , use customized Grafana(v7.1.0) downloadable from below links

Note : Please check the Grafana configurations before starting the Grafana and modify it if any changes required.


Prerequisites:

  • Kindly install grafana-image-renderer plugin before starting Grafana. This can’t be bundled as part of package since this is huge in size.

    • cd grafana/bin

    • grafana-cli plugins install grafana-image-renderer

  • Start the Grafana

  • Configure datasource.

    • Name - PDF_ENDPOINT

    • url - <protocol>://<host>/PlatformService/externalApi/exportPDF/getDashboardAsPDF(Note: if App is configured with domain name use that to configure)

    • No Auth is required. Click on Save and Test.

  • Make sure you have workflow and report jar are running to receive mails.

  • Configure your mail id in Grafana → Preference → email. ( For this you need admin permission)

  • Configure work type in table INSIGHTS_WORKFLOW_TYPE - > GRAFANADASHBOARDPDFREPORT.

  • Configure work flow task in INSIGHS_WORKFLOW_TASK table as below

    • {
         "description":"GRAFANA_PDF_Execute",
         "mqChannel":"WORKFLOW.TASK.GRAFANAPDF.EXCECUTION",
         "componentName":"com.cognizant.devops.platformreports.assessment.core.GrafanaPDFExecutionSubscriber",
         "dependency":"0",
         "workflowType":"GRAFANADASHBOARDPDFREPORT"
      }
    • {
         "description":"Grafana Email_Exeute",
         "mqChannel":"WORKFLOW.TASK.EMAIL.EXCECUTION",
         "componentName":"com.cognizant.devops.platformreports.assessment.core.ReportEmailSubscriber",
         "dependency":"1",
         "workflowType":"GRAFANADASHBOARDPDFREPORT"
      

  • Check smtp configurations in server-config.json .

  • Start the Grafana

  • There are 2 options to generate PDF

    • Grafana Dashboard - Immediate dashboard pdf emailed to the user who is downloading it.

    • Through Configuration - Scheduled dashboard reports with mailing preferences as shown in below screens.


Usage:

From Customized Grafana :

Grafana PDF Download Options:

  • Dashboard

    • Click the Download icon dropdown and choose dashboard .On click you will get a message "PDF sent to your inbox!" .

    • This option will print the entire dashboard as PDF format which cannot be printable if the dashboard is huge .

Mail will be received shortly since it is processed offline.

Sample pdf for the above dashboard:

  • Printable

    • Click the Download icon dropdown and choose Printable. On click you will get a message "PDF sent to your inbox!" .

    • This option will print the entire dashboard as PDF format which can be printable .

    • Note: Text panels are not supported in printable . Either remove text panels in dashboard or use Dashboard option

Mail will be received shortly since it is processed offline.

Sample PDF for Printable


UI for creating and scheduling customized reports:

From the menu select Dashboard Report Download:

Long Running dashboards will be timedout like more than 30 seconds.

  • Configuring Report

    • Click the plus icon and select the Organization and dashboard you want to create a report.

    • PdfType has 2 options

      • Dashboard View - Provides snapshot of entire dashboard as PDF.

      • Printable View - Provides PDF with panels arranged in A4 format that can be used for printing the PDF.

    • Once Dashboard is selected and if it has template variables configured it will list you the variables for selection as below.

    • Now select the required filters such as Portfolio, Product, Team.

    • Select the Frequency based on below requirements

      • ONETIME - Only for this frequency Absolute time range can be chosen in the next dropdown

      • DAILY, WEEKLY, MONTHLY, YEARLY - Both Relative and Other time range will work.

      • Once Everything is selected , user can click on Preview dashboard and see how the report will be received based the selected filters and time range as below. This popup is non-interactable.

      • If the Preview is as per your need , click “Ok” which will enable “Save” button. Fill the necessary information in mailing details and save the report.

  • Listing the Reports

    • Post saving list of reports are shown as below.

    • Details in this screen shows the execution History of the report.

  • Editing the configured report.

    • Except Organization and Dashboard name, you can edit remaining fields as below and update it.

  • No labels