From 19565d418264fbce61110b3a8d99dd2ad091eca5 Mon Sep 17 00:00:00 2001 From: Bill Buchan Date: Wed, 6 Nov 2024 09:27:50 +0000 Subject: [PATCH] Allow metric to be deployed to standby databases --- .../collection/ME#24#USER_NOTES_REPLICATION.xml | 2 +- .../delius/user_notes_replication/mea.xml | 2 +- .../metadata/ME#24#USER_NOTES_REPLICATION.xml | 4 ++-- .../scripts/user_notes_replication.sh | 7 +++++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/collection/ME#24#USER_NOTES_REPLICATION.xml b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/collection/ME#24#USER_NOTES_REPLICATION.xml index 3f2f67917..b1efb470d 100644 --- a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/collection/ME#24#USER_NOTES_REPLICATION.xml +++ b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/collection/ME#24#USER_NOTES_REPLICATION.xml @@ -1,4 +1,4 @@ - + diff --git a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/mea.xml b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/mea.xml index 106f3e4c5..dfda974d1 100644 --- a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/mea.xml +++ b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/mea.xml @@ -1,5 +1,5 @@ - + diff --git a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/metadata/ME#24#USER_NOTES_REPLICATION.xml b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/metadata/ME#24#USER_NOTES_REPLICATION.xml index 170c68387..6bac6232c 100644 --- a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/metadata/ME#24#USER_NOTES_REPLICATION.xml +++ b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/metadata/ME#24#USER_NOTES_REPLICATION.xml @@ -1,4 +1,4 @@ - + Detect if User Notes are not being replicated by DMS @@ -7,7 +7,7 @@ -OPERATIONDAY +OPERATIONDAY RATE diff --git a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/scripts/user_notes_replication.sh b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/scripts/user_notes_replication.sh index c39e8c2ba..bb3cef1eb 100644 --- a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/scripts/user_notes_replication.sh +++ b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/user_notes_replication/scripts/user_notes_replication.sh @@ -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 <