Adding original DM files
This commit is contained in:
26
fromDmOct2025/v930p2/oracle_list_dg.sh
Normal file
26
fromDmOct2025/v930p2/oracle_list_dg.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/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_dg.sh
|
||||
|
||||
MYDIR="$(dirname "$(realpath "$0")")"
|
||||
# source $MYDIR/rbk_api.conf
|
||||
source $MYDIR/oracle_funcs.sh
|
||||
|
||||
echo Connecting to Rubrik with IP $RUBRIK_IP
|
||||
|
||||
# API call to list Oracle DBs
|
||||
ENDPOINT="https://$RUBRIK_IP/api/v1/oracle/db?is_data_guard_group=true&is_relic=false"
|
||||
|
||||
rest_api_get
|
||||
|
||||
echo -e "SID\t\tSLA\t\t\t\tArchivelogMode\tDG Type\t\tDG Group"
|
||||
echo -e "---\t\t---\t\t\t\t--------------\t-------\t\t--------"
|
||||
cat /tmp/rbkresponse.$$ | jq -r '.data[] | {name,effectiveSlaDomainName,isArchiveLogModeEnabled,dataGuardType,dbUniqueName} ' | jq -r ' "\(.name)\t\(.effectiveSlaDomainName)\t\t\t\(.isArchiveLogModeEnabled)\t\t\(.dataGuardType)\t\(.dbUniqueName)"'
|
||||
|
||||
cleanup
|
||||
Reference in New Issue
Block a user