I need to set up email alerts on a custom sql metric that I have created.
Here is what I have done so far in Enterprise manager grid control.
1) Login to EMGC
2) Select host then the target on the host.
3) Select "User-Defined Metrics" on lower Right hand side.
4) Created my custom sql script "CUSTOM_CHECK" Return either 0 success or 1 failure
5) Saved it.
I'm trying to setup an email alert , when the script runs and generates a failure.
Also I have 10 other databases on 2 hosts , where I need this script to execute and be monitored.
Do I need to create the sql metric for each target on each host? Or is there a simpler way of doing this.
How do I define this in GC, so that it traversese across all dataabases.
1)Login as sysman or other super user.
2)Go to *'Preferences'* at the upper right hand side.
3)Click on *'Rules'* on at left side.
4)Select *'Database Availability'* and Critical States' and hit Edit.
5)In *'General'* in *'Target Type'* - Select Database Instance and below that select *'Apply rule to all Database Instance targets'*
6)Go to the *'Metrics'* tab
7)Click on *'Add'* and select *'User-Defined Numeric Metric'* with Metric ID,Key
8)Hit ok and Save.
Not that I know of.You have to go in each instance and create the custom alert under user defined metrics. You can just copy and paste the same script in each instance.
Please mark your post answered if you got your solution.