Skip to content

AsBuiltReport/AsBuiltReport.Rubrik.CDM

Repository files navigation

Rubrik CDM As Built Report

πŸ“š Sample Reports

Sample Report 1 - Default Style

Sample Rubrik report using default report style

Sample Report 2 - Custom Style

Sample Rubrik report using custom report styles

πŸ”° Getting Started

Below are the instructions on how to install, configure, and generate a Rubrik CDM As Built report.

πŸ’Ύ Supported Versions

  • To be added

πŸ”§ System Requirements

The following PowerShell modules are required for generating a Rubrik As Built report.

Each of these modules can be easily downloaded and installed via the PowerShell Gallery

πŸ” Required Privileges

In order to generate a Rubrik CDM As Built Report, user credentials with the administrator role are required. The use of non-administrative credentials may produce incomplete results.

πŸ“¦ Module Installation

Installing the Rubrik SDK for PowerShell

  1. Ensure you have the Windows Management Framework 5.0 or greater installed.
  2. Open a Powershell console with the Run as Administrator option.
  3. Run Set-ExecutionPolicy using the parameter RemoteSigned or Bypass.
  4. Run Install-Module -Name Rubrik -Scope CurrentUser to download the module from the PowerShell Gallery. Note that the first time you install from the remote repository it may ask you to first trust the repository.
  5. Alternatively Install-Module -Name Rubrik -Scope AllUsers can be execute be used if you would like to install the module for all users on the current system.

Installing the As Built Report Module

Installing the As Built Report core module with the below instructions takes care of installing all of subsidiary reports, including the Rubrik CDM core report.

Open a Windows PowerShell terminal window and install each of the required modules as follows;

Install-Module AsBuiltReport

To install individual report modules the following can be utilized:

Find-Module -Name AsBuiltReport.* -Repository PSGallery
Install-Module -Name AsBuiltReport.Vendor.Product
e.g. Install-Module -Name AsBuiltReport.Rubrik.CDM

✏️ Configuration

The Rubrik CDM As Built Report utilises a JSON file to allow configuration of report information, options, detail and healthchecks.

A Rubrik report configuration file can be generated by executing the following command;

New-AsBuiltReportConfig -Report Rubrik.CDM -Path <User specified folder> -Name <Optional>

Executing this command will copy the default Rubrik report JSON configuration to a user specified folder.

All report settings can then be configured by directly modifying the JSON file.

The following provides information of how to configure each schema within the report's JSON file.

Report

The Report sub-schema provides configuration of the vSphere report information

Sub-Schema Setting Default Description
Name User defined Rubrik CDM As Built Report The name of the As Built Report
Version User defined 1.0 The report version
Status User defined Released The report release status
ShowCoverPageImage true / false true Toggle to enable/disable the display of the cover page image
ShowTableOfContents true / false true Toggle to enable/disable table of contents
ShowHeaderFooter true / false true Toggle to enable/disable document headers & footers
ShowTableCaptions true / false true Toggle to enable/disable table captions/numbering

Options

The Options sub-schema allows certain options within the report to be toggled on or off.

Currently the Rubrik CDM As Built Report does not utlize this section.

InfoLevel

The InfoLevel sub-schema allows configuration of each section of the report at a granular level. The following sections can be set

There are 4 levels (0/1/3/5) of detail granularity for each section as follows;

Setting InfoLevel Description
0 Disabled Does not collect or display any information
1 Summary Provides summarized information for a collection of objects
2 Unused Reserved for future use
3 Detailed Provides detailed information for individual objects
4 Unused Reserved for future use
5 Comprehensive Provides comprehensive information for individual objects, such as advanced configuration settings

Note While you can specify InfoLevels of 2 and 4, they will simply default to the closest defined level below them. IE 2 becomes 1 and 4 becomes 3.

The table below outlines the default and maximum InfoLevel settings for each section.

Sub-Schema Default Setting Maximum Setting
Cluster 3
SLADomains 3
ProtectedObjects 3
SnapshotRetention 3

Healthchecks

The Healthcheck section of the Rubrik CDM As Built Report is not currently utilized.

πŸ’» Examples

  • Generate HTML & Word reports with Timestamp

    Generate a Rubrik CDM As Built Report for a cluster named 'cluster1.domain.local' using specified credentials. Export report to HTML & DOCX formats. Use default report style. Append timestamp to report filename. Save reports to 'C:\Reports'

    New-AsBuiltReport -Target 'cluster1.domain.local' -Username '[email protected]' -Password 'SuperSecret' -Report Rubrik.CDM -Format Html,Word -OutputFolderPath 'C:\Reports' -Timestamp
  • Generate HTML & Word reports using API Token authentication

    Generate a Rubrik CDM As Built Report for a cluster named 'cluster1.domain.local' using specified API Token. Export report to HTML & DOCX formats. Use default report style. Append timestamp to report filename. Save reports to 'C:\Reports'

    New-AsBuiltReport -Target 'cluster1.domain.local' -Token '1234abcd' -Report Rubrik.CDM -Format Html,Word -OutputFolderPath 'C:\Reports' -Timestamp
  • Generate HTML & Text reports

    Generate a Rubrik CDM As Built Report for a cluster named 'cluster1.domain.local' using stored credentials. Export report to HTML & Text formats. Use default report style. Save reports to 'C:\Reports'

    New-AsBuiltReport -Target 'cluster1.domain.local' -Credential $Creds -Report Rubrik.CDM -Format Html,Text -OutputFolderPath 'C:\Reports'
  • Generate report with multiple Rubrik cluster using Custom Style

    Generate a single Rubrik CDM As Built Report for clusters 'cluster1.domain.local' and 'cluster2.domain.org' using specified credentials. Report exports to WORD format by default. Apply custom style to the report. Reports are saved to the user profile folder by default.

    New-AsBuiltReport -Target 'cluster1.domain.local','cluster2.domain.org' -Username '[email protected]' -Password 'SuperSecret' -Report Rubrik.CDM -StyleFilePath C:\Scripts\Styles\MyCustomStyle.ps1

    Note the Username/Password combiniation or credentials being passed/used must have administrative rights on both the cluster1.domain.local and cluster2.domain.local domains.

  • Generate HTML & Word reports, attach and send reports via e-mail

    Generate a Rubrik CDM As Built Report for the cluster named 'cluster1.domain.local' using specified credentials. Export report to HTML & DOC formats. Use default report style. Reports are saved to the user profile folder by default. Attach and send reports via e-mail.

    New-AsBuiltReport -Target 'cluster1.domain.local' -Username '[email protected]' -Password 'domain.local' -Report Rubrik.CDM -Format Html,Word -OutputFolderPath C:\Reports -SendEmail
  • Generate Word reports using the generated JSON config

    New-AsBuiltReport -Report Rubrik.CDM -Target <targetcluster> -Credential (Import-CliXML -Path <path_to_encrypted_creds>) -Format Word -Orientation Portrait -OutputFolderPath <path_to_generated_report> -ReportConfigFilePath <path_to_AsBuiltReport.Rubrik.CDM.json> -AsBuiltConfigFilePath <path_to_as_built_config>
  • Generate Word reports using the generated JSON config, along with verbose logging

    New-AsBuiltReport -Report Rubrik.CDM -Target <targetcluster> -Credential (Import-CliXML -Path <path_to_encrypted_creds>) -Format Word -Orientation Portrait -OutputFolderPath <path_to_generated_report> -ReportConfigFilePath <path_to_AsBuiltReport.Rubrik.CDM.json> -AsBuiltConfigFilePath <path_to_as_built_config> -Verbose

❗ Known Issues

  • InfoLevel 3 and above causes "User Not Found" messages to be displayed on the console.
    • While not a show stopper, when running the Rubrik CDM As Built Report with Cluster Info Level of 3 or higher User not found messages are shown in the console. This is the result of Rubrik trying to query deeper information about users who no longer have an LDAP Account within the system. Reports continue to generate regardless of the error shown.