In order to modify “sizeOfOSAuditFiles” metric for all the targets in OEM when you have several of them use below script to do all in one shot
Check the current values/setting for your targets
select * from
sysman.MGMT$METRIC_COLLECTION A
where A.METRIC_NAME='sizeOfOSAuditFiles'
and WARNING_THRESHOLD <'2000';
--and target_name='<target_name>
where A.METRIC_NAME='sizeOfOSAuditFiles'
and WARNING_THRESHOLD <'2000';
--and target_name='<target_name>
select
'emcli modify_threshold -target_name="'||A.target_name||'" -target_type="oracle_database" -metric="sizeOfOSAuditFiles" -column="FILE_SIZE" -warning_threshold="2000" -critical_threshold="5000" -force'
from sysman.MGMT$METRIC_COLLECTION A
where A.METRIC_NAME='sizeOfOSAuditFiles'
and WARNING_THRESHOLD <='2000';
'emcli modify_threshold -target_name="'||A.target_name||'" -target_type="oracle_database" -metric="sizeOfOSAuditFiles" -column="FILE_SIZE" -warning_threshold="2000" -critical_threshold="5000" -force'
from sysman.MGMT$METRIC_COLLECTION A
where A.METRIC_NAME='sizeOfOSAuditFiles'
and WARNING_THRESHOLD <='2000';
$ emcli login -username=sysman
vi modify_audit.sh
[oracle@omshost
CB]$ ll
total 20
-rw-r-----. 1 oracle dba 18471 Apr 22 08:42 modify_audit.sh
[oracle@ omshost
CB]$ chmod 755 modify_audit.sh
total 20
-rwxr-xr-x. 1 oracle dba 18471 Apr 22 08:42 modify_audit.sh
[oracle@ omshost
CB]$ sh modify_audit.sh
total 20
-rw-r-----. 1 oracle dba 18471 Apr 22 08:42 modify_audit.sh
total 20
-rwxr-xr-x. 1 oracle dba 18471 Apr 22 08:42 modify_audit.sh