Monday, April 22, 2024

OEM Modifying-em-metric-threshold sizeOfOSAuditFiles

 

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>
 
Generate emcli command using below
 
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';
 
Place the above emcli commands in shell script and run from OMS repo server

$ 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
 

 



 and if you want to disable this metric itself then follow below oracle Doc, thanks 

 

0 comments:

Post a Comment

Auto Scroll Stop Scroll