Database Reference
In-Depth Information
Data columns are really the metric values you want to collect. For example, you might want to monitor the size
of a staging directory in which files are loaded for subsequent processing. The total size of the files in that directory is
the metric you want to calculate—that would be one data column. You might also want to calculate the total number
of files in the staging directory—that's another data column. For each of those data columns, you might want to define
a comparison operator. In this case, you will most likely want to select the more-than ( > ) alert condition so you can
generate warnings and errors when the size or number of files in the staging directory grows beyond the predefined
threshold. Note that it's important to select the right operator during metric development. The thresholds themselves
are optional and can be customized by metric extension users for each target. However, the operators can be changed
only by the metric extension author, and changing them requires creating a new version of the metric extension.
Imagine now that you want to monitor not one but multiple staging directories—and each of them separately.
Instead of defining multiple metric extensions (one per directory), you can combine them into the same metric
extension and collect the directory size and the number of files as a separate line and then add a directory path to
distinguish the lines. This is when you would use key columns. In this example, the directory path would be the
key column, and the size of the files would be a data column. Note that if you are creating a new version of a metric
extension, you can't remove any of the existing columns or add any key columns. When it comes to modifications, you
can change only some properties of the existing columns, such as display name and comparison operator. However,
you can add additional data columns. For example, if you already have a metric monitoring the size of a directory,
you can't create a new version and add a key column with a directory path to monitor the sizes of multiple directories.
Instead, you will need to clone it as a new metric extension and not just the next version.
The key column (or columns) must be unique for each data collection. Otherwise, an error is raised. If an adapter
receives multiple rows, and no key columns are defined for the metric extension, an error is raised as well. Finally,
remember to choose the correct column type: String or Number. Remember that only number metrics are displayed
on the charts and rolled up or aggregated as collection data aged in EM12c moving from detailed to hourly and daily
snapshots. String metrics are displayed only as tables in the EM interface.
OS Command—Single Column
The OS Command—Single Column adapter returns just one value. You should still think of it as a table with one
column and one row (EM12c always treats metrics as tables), so you need to define a single column in the Columns
tab. The complete output of the command even multiline output—is passed back as a value. I haven't found much use
for this adapter, but if you need to pass back a multiline fragment of text, this is the way to go. You can then set up a
CONTAINS or MATCH alert condition to test the existence of a substring or regular expression match for this returned text.
Note that this adapter doesn't have Delimiter and Start With properties as OS Command—Multiple Columns
does. You can't filter output lines with a prefix. Unfortunately, this adapter is available for only a very limited set of
targets, as described later in the section “Adapters and Target Types.”
OS Command—Multiple Values
The OS Command—Multiple Values adapter returns multirow results by using the same prefix mechanism as the OS
Command—Multiple Columns adapter. It doesn't have the Delimiter property, because the adapter doesn't split
the content of the line in multiple values; the content of the whole line after the prefix is passed as the value. The
end result is a single-column table. Note that you define only a single data column and no key columns. The adapter
basically collects a set of values. So the difference between this adapter and OS Command—Multiple Columns is that
OS Command—Multiple Values doesn't require any key columns.
One use for such an adapter is collecting lines from the log file, where you can define a CONTAINS or MATCH
condition on the column. Note that if you try to simulate a similar collection with the OS Command—Multiple
Columns adapter by using a single key column, you wouldn't be able to define an alerting condition on that column.
In addition, duplicate values would produce an error.
 
Search WWH ::




Custom Search