Adding original DM files

This commit is contained in:
2025-10-03 10:15:23 -04:00
parent 1508078efb
commit bc30f7b788
31 changed files with 2818 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
#!/bin/bash
#
# Example API call script for Die Mobiliar
# v0.2 - James Pattinson - August 2021
#
# Lists the registered DBs for a given Oracle Host or RAC
# and their assigned SLAs
#
# usage: oracle_list_db.sh <HOSTNAME>
MYDIR="$(dirname "$(realpath "$0")")"
# source $MYDIR/rbk_api.conf
source $MYDIR/oracle_funcs.sh
if [ $# -ne 1 ]; then
echo "Usage: $0 <dbhost>"
exit 1
fi
RBK_HOST=$1
echo Connecting to Rubrik with IP $RUBRIK_IP
# API call to list Oracle DBs
ENDPOINT="https://$RUBRIK_IP/api/internal/oracle/db"
rest_api_get
echo -e "SID\t\tSLA\t\t\tArchivelogMode\tDG Type\t\tDG Group"
echo -e "---\t\t---\t\t\t--------------\t-------\t\t--------"
cat /tmp/rbkresponse.$$ | jq -r --arg HOST $RBK_HOST '.data[] | select(.infraPath[0].name==$HOST and .isRelic==false) | {sid,effectiveSlaDomainName,isArchiveLogModeEnabled,dataGuardType,dataGuardGroupName} ' | jq -r ' "\(.sid)\t\(.effectiveSlaDomainName)\t\t\(.isArchiveLogModeEnabled)\t\t\(.dataGuardType)\t\(.dataGuardGroupName)"'
cleanup