Skip to content

Darrenswift/Rubrik_Quotas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Rubrik_Quotas

Rubrik quotas functionality for Rubrik CDM 5.1.x & 5.2 Tested using python 3.7.7 & 3.8.1

Description

Script use is designed to give quotas funcationality on Rubrik CDM. The script has 'soft' and 'hard' limits.

A soft limit 'slimits' will send an email out to an administrator of the Rubrik CDM platform wwarning that the soft threshold has been reached or exceeded.

A hard limit 'hlimits' will pause the SLA's which have passed the threshold, resulting in no more backup jobs running to that SLA(s).

In order to test without pausing SLA's on a Rubrik cluster # line 61 'sla_pause'

Variables to Configure

Define soft and hard thresholds, these are calculated as a percentage of the total available storage of the Rubrik cluster

Confgure email settings for email message out if in breach of soft limits. Note in this version of the script it leverages https://mailtrap.io/ using 'smtplib'

📘 Documentation

This script leverages Rubrik CDM python_sdk and rubrik_cdm module will need to be loaded as per below:

Install from pip:

pip install rubrik_cdm

Install from source:

$ git clone https://github.com/rubrikinc/rubrik-sdk-for-python
$ cd rubrik-sdk-for-python
$ python setup.py install

Here are some resources to get you started! If you find any challenges from this project are not properly documented or are unclear, please raise an issue

🔍 Example

By default, the Rubrik SDK will attempt to read the the Rubrik Cluster credentials from the following environment variables:

  • rubrik_cdm_node_ip
  • rubrik_cdm_username
  • rubrik_cdm_password
  • rubrik_cdm_token
Note: The rubrik_cdm_username and rubrik_cdm_password must be supplied together and may not be provided if the rubrik_cdm_token variable is present
import rubrik_cdm
rubrik = rubrik_cdm.Connect()

cluster_version = rubrik.cluster_version()

print(cluster_version)

About

Rubrik quotas functionality for Rubrik CDM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages