Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Prerequisite : PlatformService >= 8.4 and Grafana > 7.1.0

Info

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

...

Sample Pdf

PDF
nameSprint score card report.pdf

Prerequisites:

Expand
titleInternet connection to the box is necessary .
  • PlatformService >= 8.4 and > Grafana 7.1.0

  • (Optional) 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

    • If this step is success, there are less chance of skipping step 3 as it will download the chromium browser necessary for this feature.

  • Except windows and ubuntu please refer to below steps for adding the missing libraries for PDF to be downloaded in printable format

    • Linux

      • In general you can use the ldd utility to figure out what shared libraries are not installed in your system:

        Code Block
        cd <grafana-image-render plugin directory>
        ldd chrome-linux/chrome
              linux-vdso.so.1 (0x00007fff1bf65000)
              libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f2047945000)
              libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f2047924000)
              librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f204791a000)
              libX11.so.6 => not found
              libX11-xcb.so.1 => not found
              libxcb.so.1 => not found
              libXcomposite.so.1 => not found
    • Ubuntu >= 18.10

      • libx11-6 libx11-xcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrender1 libxtst6 libglib2.0-0 libnss3 libcups2 libdbus-1-3 libxss1 libxrandr2 libgtk-3-0 libgtk-3-0 libasound2 libxcb-dri3-0 libgbm1

    • Debian 9

      • libx11 libcairo bcairo2 libcairo2 libxtst6 libxcomposite1 libx11-xcb1 libxcursor1 libxdamage1 libnss3 libcups libcups2 libXss libXss1 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libgtk-3-0 libgbm1

    • Debian 10

      • libxdamage1 libxext6 libxi6 libxtst6 libnss3 libnss3 libcups2 libxss1 libxrandr2 libasound2 libatk1.0-0 libatk-bridge2.0-0 libpangocairo-1.0-0 libpango-1.0-0 libcairo2 libatspi2.0-0 libgtk3.0-cil libgdk3.0-cil libx11-xcb-dev libgbm1

    • CentOS

      • libXcomposite libXdamage libXtst cups libXScrnSaver pango atk adwaita-cursor-theme adwaita-icon-theme at at-spi2-atk at-spi2-core cairo-gobject colord-libs dconf desktop-file-utils ed emacs-filesystem gdk-pixbuf2 glib-networking gnutls gsettings-desktop-schemas gtk-update-icon-cache gtk3 hicolor-icon-theme jasper-libs json-glib libappindicator-gtk3 libdbusmenu libdbusmenu-gtk3 libepoxy liberation-fonts liberation-narrow-fonts liberation-sans-fonts liberation-serif-fonts libgusb libindicator-gtk3 libmodman libproxy libsoup libwayland-cursor libwayland-egl libxkbcommon m4 mailx nettle patch psmisc redhat-lsb-core redhat-lsb-submod-security rest spax time trousers xdg-utils xkeyboard-config alsa-lib

  • 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.

  • Make sur sure that you have “dashboardReportTemplate“ folder in INSIGHTS_HOME, click here to download sample files Click here dashboardReportTemplate.zip

  • Configure work type in table INSIGHTS_WORKFLOW_TYPE - > GRAFANADASHBOARDPDFREPORT.

  • Configure work flow task in INSIGHS_WORKFLOW_TASK table as below

    • Code Block
      languagejson
      {
         "description":"GRAFANA_PDF_Execute",
         "mqChannel":"WORKFLOW.TASK.GRAFANAPDF.EXCECUTION",
         "componentName":"com.cognizant.devops.platformreports.assessment.core.GrafanaPDFExecutionSubscriber",
         "dependency":"0",
         "workflowType":"GRAFANADASHBOARDPDFREPORT"
      }

    • Code Block
      languagejson
      {
         "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

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

UI for creating and scheduling customized reports:

From the menu select Dashboard Report Download:

Info

Dashboard having data heavy panels should have load time specified higher than 30 sec. Default time set is 30 sec.

  • Configuring Report

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

    • Image Removed

  • Add appropriate title.

  • Theme has 2 options

    • Dark (Default) .

    • Light.

  • 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.

    Before that pls choose the necessary load time that is taking for the given dashboard to load (With cache timing) as below for Dashboard View

    Image Removed

    For printable view load time differs. Here please select the maximum time taken for a panel to load

    .

    • Image Removed

      After this load time selection please fill the loaded filters as below.

    • Image Removed

  • Now select the required filters such as Sprintname and SprintId.

  • Image Removed

  • Select the Frequency based on below requirements

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

    • Image Removed

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

    • Image Removed

      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.

    • 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.

      • Image Removed

    • We can toggle between active and in-active state. Once the Report is made to In-active it will not be executed further.

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

      • Image Removed
  • Editing the configured report.

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

  • Updating the report will trigger report again based on schedule.

    Image Removed

...