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 11 Next »

A feature that would enable users/auditors to write queries for broader usecases on the UI.

For each query, the implementation will leverage the offline scheduler, that would run the cypher based on the configured frequency.

For each asset returned by the cypher, a corresponding HL/Cypher traceability report would be prepared as a PDF.

The PDF would be emailed to the list of subscribers based on the frequency. Each query on the UI to send a consolidated PDF for all the individual assets returned by the cyper.

Details on Query Builder UI

This UI has 2 screens for addition and edit/delete.

    Addition of Cypher queries (All fields are mandatory).

    Name of the Query - Unique Report Name 

    Frequency -  daily, weekly, fortnightly, monthly to execute the Query

    Subscribers Please provide valid email address. You may use ‘,‘ to provide multiple email address

    Query Please select source of data for generating report( neo4j or hyperledger)

    Upload QueryUpload Cypher query with proper syntax

    

    


    Edit/Delete Report Queries.

    

Report Types

       There are 2 types of reports that can be distinguished based on Query type in UI . 

SnoCYPHERCYPHER and HYPHERLEDGER
1Fetches records from NEO4j DatabaseFetches records from both NEO4j and Hypherledger
2

Upload file will have 2 fields as query and table_structure

Upload file will have only query field as below .
3PDF will be generated based on the table_structure mapping to cypherresponse.jsonPDF will be generated based on hyperledger response which is fixed for now.

Prerequisites: Create a folder named Audit-report under $INSIGHTS_HOME/.Insights/ and provide write priviledge. This is required for placing the uploaded files.

Deep dive into cypher response and Mapping.

         - Report from Cypher and its table_structure.

           Let's take the neo-feature-build.json attached above as sample.

            {
                "queryname" : "MATCH (g:GIT:DATA)-[*1..2]->(u:UCD:DATA) WHERE g.branchName <> 'master' and u.environment='PROD' RETURN g,u",
                "table_structure" : {
                           "REPO NAME" : "g.repoName",
                           "MESSAGE" : "g.message",
                           "BRANCH NAME":"g.branchName",
                           "STATUS": "u.status",
                           "ENVIRONMENT": "u.environment"    

                   }
            }

           

             Query : MATCH (g:GIT:DATA)-[*1..2]->(u:UCD:DATA) WHERE g.branchName <> 'master' and u.environment='PROD' RETURN g,u

             CypherResponse: (showing only one node for sample).

             

              Here g, u are result nodes which has corresponding results in row array index where g is mapped to 0 and u is mapped to 1 . 

              Sample Mapping :  In order to map these results to PDF we can select the key names from the cypher response as below with the resultant node.

              "REPO NAME" : "g.repoName","MESSAGE" : "g.message","BRANCH NAME":"g.branchName","STATUS": "u.status","ENVIRONMENT": "u.environment"

PDF Sample

The resultant generated PDF will look like this if all config is correct.


Attaching the whole PDF for reference (pwd:12345)


Mail Config

Provide the Mail server configuration in server-config.json file present in $INSIGHTS_HOME/.InSights/ as below.

"emailConfiguration":
{
         "smtpHostServer": "",
         "smtpPort": "",
         "smtpUserName": "",
         "smtpPassword": "",
         "mailFrom": ""
}

Log Analysis

Each report will generate corresponding log as ${reportname.log} configured in UI. These can be downloaded from UI for analysis purpose which is located as one of the tab in healthcheck page.

Prerequisites : Create a folder named Reports under PlatformAuditService in ${INSIGHTS_HOME}\logs\PlatformAuditService\ and provide write access. 




Back to Top

  • No labels