IBM ITM for Oracle配置说明
1,Oracle在ITM中的监控设置思路Local Installed Oracle Agent
OS
+Oracle process CPU warning
RZ
+database status critical
+listener.ora critical
RDB
+alert.log warning
+alert.log critical
Remote Installed Oracle Agent
RZ
+tnsname.ora critical
RDB
+ASM disk status critical
+ASM disk group status critical
+ASM client status critical
+ASM disk group space warning
+ASM disk group space critical
+buffer pool hit ratio warning
+lock conflict warning
+tablesapce space warning
+tablesapce space critical
+tablespace status critical
+tablespace datafile status critical
+Customer SQLs rman backup warning
+Customer SQLs user password expiring warning
+Customer SQLs user locked or graced critical
+DG status critical
+DG redo apply process critical
+DG archive gap critical
2,使用ITM Oracle自定义SQL监控备份情况
a,在/opt/IBM/ORACLEITM/config/krzcussql.properties中定义需要监控的SQL语句,格式如下
[SELECTSQL]
SQL_ID=RMAN Backup Details for TEST
SQL_TEXT=select status,d.name DBNAME,d.dbid DBID,to_char(r.start_time,'mm/dd/yyyy hh24:mi:ss') start_time,to_char(r.end_time,'mm/dd/yyyy hh24:mi:ss') end_time,r.TIME_TAKEN_DISPLAY,SESSION_RECID from v$database d,V$RMAN_BACKUP_JOB_DETAILS r where to_char(r.start_time,'mm/dd/yyyy hh24:mi:ss')=(select to_char(max(start_time),'mm/dd/yyyy hh24:mi:ss')from v$rman_backup_job_details);
也可以使用下面的监控语句来定义备份的天数是否超过1天。
select r.status status,sysdate-r.end_time DeltaTime,d.name DBNAME,d.dbid DBID,to_char(r.start_time,'mm/dd/yyyy hh24:mi:ss') start_time,to_char(r.end_time,'mm/dd/yyyy hh24:mi:ss') end_time,r.TIME_TAKEN_DISPLAY,SESSION_RECID from v$database d,V$RMAN_BACKUP_JOB_DETAILS r where to_char(r.start_time,'mm/dd/yyyy hh24:mi:ss')=(select to_char(max(start_time),'mm/dd/yyyy hh24:mi:ss')from v$rman_backup_job_details);
conn / as sysdba
grant select on V_$RMAN_BACKUP_JOB_DETAILS to tivoli;
c,创建KRZ RDB CUSTOMIZED SQL DETAIL监控,我们这里定义
First String Column Name + First String Value + SQL_ID
=='STATUS' + !='COMPLETED' + =='RMAN Backup Details for TEST'
d,当有STATUS='FAILED'等状态的查询,则告警。
3,用户密码即将过期告警
DGDB> grant select on dba_users to tivolirz;
DGDB> alter user DONGFANG profile IBM_PROFILE;
User altered.
DGDB> select EXPIRY_DATE-SYSDATE "EXPIRING_DAYS",username from dba_users where username in ('DONGFANG','HR');
EXPIRING_DAYS USERNAME
------------- ------------------------------
11.4653704 DONGFANG
101.194803 HR