Reason: Monitoring hundreds of DBs and DB servers. We check cpu stats every 10 minutes, with retry set to 10 minutes and max attempts to 4. So basically, we allow the CPU to "cook" for 30 minutes before a notification is sent. When its time for that notification I also want to run another check and find out the top CPU using Oracle processes and then run some SQL commands that will then output all kind of data. I then need to get that data to the same people getting the CPU check.
Example data(repeated for the top 3 or 4 CPU using processes):
Code: Select all
Enter Unix process id: 2857
=====================================================================
1 sessions were found with 2857 as their unix process id.
=====================================================================
SID/Serial : 2285,33237
Foreground : PID: 10136:7564 - w3wp.exe
Shadow : PID: 2857 - [email protected]
Terminal : SERVERNAME/ UNKNOWN
OS User : NETWORK SERVICE on ITCONVERGENCE\SERVERNAME
Ora User : CUST
Details : - w3wp.exe
Status Flags: ACTIVE DEDICATED USER
Tran Active : NONE
Login Time : Tue 01:44:10
Last Call : Tue 01:44:10 - 616.2 min
Lock/ Latch : NONE/ NONE
Latch Spin : NONE
Current SQL statement:
select COUNT(a."POSITIONS") as "Count of Positions",a."EMPLOYEE_
NUMBER" as "Emp Number",a."EMPLOYEE_FULL_NAME_S" as "Employee Na
me",(concat(concat(substr(a."VAR1", 1, 3),'-'),a."LOCATIONS")) a
s "Location Info",COUNT(*) as "NWQ_AGG_SET_COUNT_SPECIAL_COL" FR
OM "CUST"."ITC_NTX_CALLREPORT_V" a WHERE (a."VAR1" LIKE 'Sale%'
and a."CONNECT_DATE">=(sysdate-90) and a."WORK_TELEPHONE"<>'0')
group by a."EMPLOYEE_NUMBER",a."EMPLOYEE_FULL_NAME_S",(concat(co
ncat(substr(a."VAR1", 1, 3),'-'),a."LOCATIONS")) order by 3
Previous SQL statement:
SELECT TYP.SYSTEM_PERSON_TYPE FROM PER_PERSON_TYPES_TL TTL, PER_
PERSON_TYPES TYP, PER_PERSON_TYPE_USAGES_F PTU WHERE TTL.LANGUAG
E = USERENV ('LANG') AND TTL.PERSON_TYPE_ID = TYP.PERSON_TYPE_ID
AND TYP.SYSTEM_PERSON_TYPE IN ('APL', 'EMP', 'EX_APL', 'EX_EMP'
, 'CWK', 'EX_CWK', 'OTHER') AND TYP.PERSON_TYPE_ID = PTU.PERSON_
TYPE_ID AND :B2 BETWEEN PTU.EFFECTIVE_START_DATE AND PTU.EFFECTI
VE_END_DATE AND PTU.PERSON_ID = :B1 ORDER BY DECODE (TYP.SYSTEM_
PERSON_TYPE, 'EMP', 1, 'CWK', 2, 'APL', 3, 'EX_EMP', 4, 'EX_CWK'
, 5, 'EX_APL', 6, 7 )
Session Waits:
WAITED SHORT TIME: latch: cache buffers chains
Locks:
TYPE=AE H: S R: NONE - ID1=4977973 ID2=0
=====================================================================
1 sessions were found with 2857 as their unix process id.
Please scroll up to see details of all the sessions.
=====================================================================Use an event handler that runs when the CPU check is run. Set the proper conditions to only run the SQL when it is the 4th check or higher. Then have it send the results as a passive result to a service based on the hostanme passed to the event handler. Then that service sends out a notification. That service needs to be able to receive hundreds of lines of data though.
So does that sound doable? Hints on how to allow that service to get all that information? Do I need to extend the field in the database like I have in the past for other stuff?