Database Reference
In-Depth Information
Figure 10-7. Modified Open Cursors metric extension
Note that you might want to have access to more than a single top session with open cursors—perhaps to the top
ten. For this, you need to convert your metric extension to a multirow metric, which requires one or more columns as key
columns. In this case, you could use the SID column as a key and then modify the query to return the top ten sessions.
Unfortunately, you won't be able to add a key column in the next version of the metric extension but instead need to
create a new metric extension. Fortunately, it's easy to clone existing metric extensions by using Actions Create Like from
the Metric Extensions home page. Note that there are other limitations on creating a new metric extension version—for
example, you cannot remove or change the sequence of the older columns but can change the Display Name.
Even though the SID (and arguably SERIAL#) is enough for the key column, consider adding other columns
in the key. This way, the alert notification can include the key values. The default alert message (see the advanced
settings when you edit the metric extension column) is as follows:
The value of %columnName% for %keyValue% is %value%
The key value will be produced as a comma-concatenated string from all keys, so your alert message will
look like this:
The value of open_cursors_pct for 260,SYSMAN,em12c2.oracloid.com,OMS,oracle,1234 is 72
You can modify your alert message to be more descriptive. For example, your alert message template could
be as follows:
Open cursors is at %value% percent for session %keyValue%
( SID, username,machine,program,osuser,process )
Right from this alert message, you can see which sessions are to blame. Unfortunately, it's currently not possible
to refer to the specific key columns of the metric to make the alert message more user-friendly. At least, I haven't
found a way to do so.
So far, you have used a SQL adapter to collect metrics. As of the 12.1.0.2.0 EM release, six documented adapters
are available for metric extensions, and one undocumented. Although you will most likely be using two adapters
(the SQL adapter and OS Command—Multiple Columns adapter), let's review all the available adapters for a more
complete picture.
 
Search WWH ::




Custom Search