definitely have templates to manage metrics depending on what type of
databases you monitor. And of course you apply changes not only through
GUI but using emcli as well.
Are they the same? They should be but at least recently I found that
using emcli to apply metrics works I would say more correctly and allows
to avoid some errors on a stage of targets selection.
The code to apply template is simple:
./emcli apply_template -name="test template" -targets="test1:oracle_database" -copy_flags="1"
where copy_flags is 0 or 1 depending
on you willing to rewrite metrics or not.
Well, looks like it is not difficult to create or change metrics on number of
targets but what about to delete some of them based on criteria or at least
those named the same.
I stuck with it when the metric to monitor tablespace's free size percentage
was added wrongly:
* The metric "Tablespace Space Used (%)" named %UNDO%
with thresholds 110 and 110 for warning and critical;
* The template with the metric was applied on dozens of databases.
Even metrics were added and had 110 % they did not work properly -
something was wrong either with name (even there is a tip to use wildcards
for the same pattern) or with per cent which is more than 100.
And the task is just to avoid paging on undo tablespaces.
After many tests of different configurations for metric names and thresholds
I found out that only 100 per cent works for thresholds and name should
not be with % symbols.
The template was changed to have a new metric name
UNDOTBS01 (100 and 100 %%) and I was ready to apply it using emcli but
what about old supposed-to-be-working ones?
How to delete them all at once or to generate a script for emcli?
Unfortunately emcli has no such command to change existing metrics
on target and I was forced to delete wrong metrics one by one manually
through Grid Control interface.
It was not quick and I spent about an hour routinely clicking the same buttons.
And I still have no idea how to do it massively.
To trace EM actions? To search Metalink?
To use tricks and tips in existing EM version?
I will try and
you have a good day!
All said before is for EM Grid Control 10.2.0.3
10.2.0.4 came with tips that
"Wildcard characters for object names are not supported."
"The "warning and critical threshold combination"
should be either (0,0), (NULL, NULL)
or (0 < warning threshold < 100, 0 < critical threshold < 100,
warning threshold <>
Attempt to apply metric for non-existing tablespace
will be executed successfully but it will not be there after update.