Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow metric to be deployed to standby databases #1093

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<TargetCollectionExt EXT_NAME="ME$USER_NOTES_REPLICATION" EXT_VERSION="1" TARGET_TYPE="host"><CollectionItem NAME="ME$USER_NOTES_REPLICATION" UPLOAD="YES">
<TargetCollectionExt EXT_NAME="ME$USER_NOTES_REPLICATION" EXT_VERSION="2" TARGET_TYPE="host"><CollectionItem NAME="ME$USER_NOTES_REPLICATION" UPLOAD="YES">
<Schedule>
<IntervalSchedule INTERVAL="1" TIME_UNIT="Hr"/>
</Schedule>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<MetricExtensionArchive name="MEAME$USER_NOTES_REPLICATION">
<MetricExtension name="ME$USER_NOTES_REPLICATION" type="host" version="1" is_repos="FALSE" display_name="User Notes Replication" description="Detect if User Notes are not being replicated by DMS" version_comment=" " metadata_digest="087605c4c7287fcc26ff2eed8a884487" coll_digest="0a60f1a562d622511bcb9ad403c100fc" attach_digest="e48a4c18daba9ee5a3bf385a52d057e5">
<MetricExtension name="ME$USER_NOTES_REPLICATION" type="host" version="2" is_repos="FALSE" display_name="User Notes Replication" description="Detect if User Notes are not being replicated by DMS" version_comment=" " metadata_digest="3d3e6406eb36f695937398c83f735b8f" coll_digest="0a60f1a562d622511bcb9ad403c100fc" attach_digest="01bb6ffb9d327d078c986ac564a27b42">
<scripts name="user_notes_replication.sh">
</scripts>
</MetricExtension>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<TargetMetadataExt EXT_NAME="ME$USER_NOTES_REPLICATION" EXT_VERSION="1" TARGET_TYPE="host"><Metric NAME="ME$USER_NOTES_REPLICATION" TYPE="TABLE">
<TargetMetadataExt EXT_NAME="ME$USER_NOTES_REPLICATION" EXT_VERSION="2" TARGET_TYPE="host"><Metric NAME="ME$USER_NOTES_REPLICATION" TYPE="TABLE">
<Display>
<Label NLSID="NLS_METRIC_hostME$USER_NOTES_REPLICATION">User Notes Replication</Label>
<Description NLSID="NLS_DESCRIPTION_hostME$USER_NOTES_REPLICATION">Detect if User Notes are not being replicated by DMS</Description>
Expand All @@ -7,7 +7,7 @@
<ColumnDescriptor NAME="MISSING_NOTES_COUNT" TYPE="NUMBER">
<Display>
<Label NLSID="NLS_COLUMN_hostME$USER_NOTES_REPLICATIONMISSING_NOTES_COUNT">Missing Notes Count</Label>
<Unit NLSID="EM_SYS_STANDARD_RATE_OPERATIONDAY">OPERATIONDAY</Unit>
<Unit NLSID="mext_unit_nlsid_OPERATIONDAY">OPERATIONDAY</Unit>
<UnitCategory>RATE</UnitCategory>
</Display>
<CategoryValue CLASS="Default" CATEGORY_NAME="Fault">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@

. ~/.bash_profile


if [[ $(srvctl config database -d ${ORACLE_SID} | awk -F: '/Start options/{print $2}' | tr -d ' ') == mount ]];
then
# Ignore this metric on mounted (not open) databases
exit 0
fi

sqlplus -s / as sysdba <<EOSQL
SET HEAD OFF
SET FEEDBACK OFF
Expand Down