diff --git a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/collection/ME#24#MATERIALIZED_VIEW_REFRESH_TIME.xml b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/collection/ME#24#MATERIALIZED_VIEW_REFRESH_TIME.xml index 5365c2257..09413cf0e 100644 --- a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/collection/ME#24#MATERIALIZED_VIEW_REFRESH_TIME.xml +++ b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/collection/ME#24#MATERIALIZED_VIEW_REFRESH_TIME.xml @@ -1,4 +1,4 @@ - + diff --git a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/mea.xml b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/mea.xml index 542db24fe..267034e1f 100644 --- a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/mea.xml +++ b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/mea.xml @@ -1,5 +1,5 @@ - + diff --git a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/metadata/ME#24#MATERIALIZED_VIEW_REFRESH_TIME.xml b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/metadata/ME#24#MATERIALIZED_VIEW_REFRESH_TIME.xml index 0f146a54f..0faa9f70f 100644 --- a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/metadata/ME#24#MATERIALIZED_VIEW_REFRESH_TIME.xml +++ b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/metadata/ME#24#MATERIALIZED_VIEW_REFRESH_TIME.xml @@ -1,4 +1,4 @@ - + Calculated in Minutes diff --git a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/scripts/time_since_oldest_mv_refresh.sh b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/scripts/time_since_oldest_mv_refresh.sh index 5d8e83520..8293e2145 100644 --- a/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/scripts/time_since_oldest_mv_refresh.sh +++ b/ansible/roles/oracle-oms-setup/files/metric_extensions/delius/materialized_view_refresh_time/scripts/time_since_oldest_mv_refresh.sh @@ -8,6 +8,9 @@ # Exit without failure if database is not up srvctl status database -d $ORACLE_SID >/dev/null || exit 0 +# Exit without failure if the database is mounted and not open (probably a standby database) +(srvctl status database -d $ORACLE_SID -v | grep -q Mounted) && exit 0 + sqlplus -s / as sysdba <