Page 1 of 1

Oracle Blocks and unsuccessfule log monitoring

Posted: Thu Mar 08, 2018 9:21 am
by jyoti22
Hi Team,
To do Oracle BLOCK detected and unsuccessful login monitoring I am using "check_oracle_health" plugin.

I have to run oracle queries for these 2 parameters. Below are the queries

select 'BLOCK DETECTED - ' || s1.username || '@' || s1.machine || ' ( SID=' || s1.sid || ' ) is blocking || s2.username || '@' || s2.machine || ' ( SID=' || s2.sid || ' ) ' AS blocking_status from v$lock l1, v$session s1, v$lock l2, v$session s2 where s1.sid=l1.sid and s2.sid=l2.sid and l1.BLOCK=1 and l2.request > 0 and l1.id1 = l2.id1 and l2.id2 = l2.id2 ;

select OS_USERNAME,USERNAME,TO_CHAR(TIMESTAMP,'MM-DD-YYYY HH24:MI:SS') TIMESTAMP,ACTION,ACTION_NAME,SESSIONID,returncode from dba_audit_trail where returncode>0 and timestamp >= sysdate - 10/(24*60);


For these 2 commands I am using --name mode. But its now showing any result. Can anyone please help on this. Thanks.

Re: Oracle Blocks and unsuccessfule log monitoring

Posted: Thu Mar 08, 2018 3:54 pm
by cdienger
What are the exact arguments you're running with check_oracle_health ? Do those queries return results if you run them directly against the oracle database? Which version of Oracle are you running?

Re: Oracle Blocks and unsuccessfule log monitoring

Posted: Fri Mar 09, 2018 1:11 am
by jyoti22
please close this thread. we created the script and its working fine now. Thanks.