Step-By-Step Create OEM Metric Extension - Send Backup Failure Alerts Using Metric Extension

Поділитися
Вставка
  • Опубліковано 2 лют 2025

КОМЕНТАРІ •

  • @alexphatelevich3876
    @alexphatelevich3876 3 роки тому +1

    Hi Thank you very mach for this video!

    • @YouVolve
      @YouVolve  3 роки тому +1

      Thanks for your feedback Alex.

  • @xxkjudth
    @xxkjudth 8 місяців тому +1

    Hello, first of all, thank you very much for the video, it has been very helpful, how could I implement this so that it also reports when a backup was successfully executed?

    • @YouVolve
      @YouVolve  8 місяців тому +1

      Hi, thanks for your question.
      Yes, you can generate an alert when a backup was successfully executed.
      Please take the last SQL query in the shared doc in my Google drive (link in the description of the video). That query returns three different values based on the backup job status: SUCCESS, WARNING and FAILED. In your case take the value SUCCESS instead of the other two in the Metric Extension's variable field. You will receive the SUCCESS status reported by the ME.

    • @xxkjudth
      @xxkjudth 7 місяців тому +1

      @@YouVolve Hello, how can I modify the alerts that arrive by email? because when you put success it comes with an event warning

    • @YouVolve
      @YouVolve  7 місяців тому

      Hi Karen, the ME in the tutorial is designed only for handling backup failures. So, it has only two alerting options: Warning or Critical. If you need a notification for success status, you have to create a separate ME with a different category like informational and write the appropriate SQL query for that.

  • @krishnamoorthiece8558
    @krishnamoorthiece8558 Рік тому +1

    Can we create metric for database full backup as well?

    • @YouVolve
      @YouVolve  Рік тому

      Thanks Krishnamoorthi for your question.
      Metric or Metric Extensions are nothing but some statistics which can be used to trigger alerts based on what value they have at a certain point in time. It cannot be used to perform a full backup or an activity like that.
      If you want to perform an activity like a full backup then you have to create a job.
      I have a 3 part video on how to automate RMAN backups and reporting in OEM using OEM jobs. If you are interested then you can watch them with the links below:
      Part-1 : ua-cam.com/video/3d3dy-0X09I/v-deo.html
      Part-2 : ua-cam.com/video/lRePWwuXlr0/v-deo.html
      Part-3: ua-cam.com/video/bBLfIAIbwJk/v-deo.html

    • @krishnamoorthiece8558
      @krishnamoorthiece8558 Рік тому

      ​@@YouVolve Thanks for the reply...I don't want to perform full backup.I just need to trigger the full backup status alert same as you created metric extension for Archive backups.

    • @YouVolve
      @YouVolve  Рік тому

      Yes, you can create the alert for full backup status also. Just change the filter condition in the WHERE clause of the SQL used in the metric extension from "INPUT_TYPE='ARCHIVELOG'" to "INPUT_TYPE like 'DB_%'" so it will include both incremental and full database backups for the alerts.

    • @krishnamoorthiece8558
      @krishnamoorthiece8558 Рік тому +1

      ​@@YouVolve Thanks for the clarification ☺️

  • @ccxu2926
    @ccxu2926 2 роки тому

    Hi,Alert Threshold:
    Warning can be configured to contain multiple values. Will an alarm be generated if one of these values is matched?

    • @YouVolve
      @YouVolve  2 роки тому

      Hi CC, if I understood your question correctly, you want to configure multiple values as Warning threshold and send the alert if at least one of the values matches right? But, here you cannot use multiple values. Instead, you can use pattern or regular expression if needed if you are comparing with strings.

  • @erics5944
    @erics5944 3 роки тому +1

    Hi Manash, great script! I will try to adapt it for our Data Guard environment (backups are take from the primary databases) so I can add the ME to the instance monitoring template and won't get criticals from the standby databases.

    • @YouVolve
      @YouVolve  3 роки тому

      Yes, definitely and monitoring template is the best way to implement it.

  • @anthoniangha6539
    @anthoniangha6539 2 роки тому

    Great Video. I however did not see the metrics under my target after deploying it.

    • @YouVolve
      @YouVolve  2 роки тому +1

      Thanks...a deployed ME won't appear in the metric page if the target type you are searching in is different than the deployed target type. For example, if your ME is for DB instance, it won't appear at DB cluster level. But if this is not the case, then probably you should raise a case with Oracle support as there is no way a deployed ME won't appear in the metrics collection and settings options for a target.

  • @edwincristianoviedobertel1419
    @edwincristianoviedobertel1419 2 роки тому

    What is the difference between creating a Set Rule of type Enterprise and Personal?
    How do we set alerting priority?

    • @YouVolve
      @YouVolve  2 роки тому

      Hello Edwin,
      Enterprise rule sets are enforced at enterprise level that includes creating/updating incidents, and sending alerts to multiple users/admins. Personal Notification rule sets are useful for admins to be notified about changes the admin is interested in. They can only be used to send alert to the owner of the rule set.
      Priorities are defined at individual rule level and severity is assigned by OEM itself. You can utilize the severity to determine what action to take against each of the rule you create under a rule set. You will get options for both while creating a rule set.

    • @christianoviedo6025
      @christianoviedo6025 2 роки тому

      @@YouVolve Is there any chance that a rule will step on another rule, since I made a personal rule, but did not alert my email

    • @YouVolve
      @YouVolve  2 роки тому

      Hello Christian,
      A rule will not step on another rule. They will just execute as per the order they were created within the ruleset. For example: it is possible that two rules under the same rule set can take a duplicate action like sending email to the same recipient. In that case the receiver will get two emails for the same incident. Whether the scope is Enterprise or Personal it is defined at ruleset level not in the rule level. So you cannot a create a ruleset with both enterprise or personal rules within it. However, you can create two rulesets - one as enterprise and another as personal. Both will execute without interfering each other.

    • @christianoviedo6025
      @christianoviedo6025 2 роки тому +1

      @@YouVolve Thank you very much for your help, it was really urgent.

  • @alexphatelevich3876
    @alexphatelevich3876 3 роки тому +1

    In --SQL used in Metric Extension to extract archivelog backup status and detect if backup did not run in the last 2 hours you missed 3 condition :
    WHEN STATUS = 'RUNNING' THEN 'RUNNING'
    Otherwhise it will throw : CRITICAL

    • @YouVolve
      @YouVolve  3 роки тому +1

      Let me take a look and get back today...

    • @YouVolve
      @YouVolve  3 роки тому +1

      Thanks Alex for pointing out the flaw. I have introduced a new condition in the WHERE clause as "STATUS NOT LIKE '%RUNNING%' " to keep the running backups out of the context as adding the "WHEN STATUS = 'RUNNING' THEN 'RUNNING'" will cause the ME to send a false "Clear" alert if the previous run of the job failed and as we never know if a running backup will end successfully or not. You can download the updated SQL if you want and please let me know if you face any issues.

  • @shymonr1009
    @shymonr1009 3 роки тому

    can you create a video for entire database monitoring --incident rules and email notification

    • @YouVolve
      @YouVolve  3 роки тому +1

      Hi Shymon, thanks for your interest. I am working on a full course on OEM that covers starting with preparing the host, installation, monitoring setup, incident rules, automations, upgrade, patching etc, everything a DBA needs to know to be an expert. The course will have two parts covering basics to the advanced topics and will be published in Udemy during March/April 2022. Unfortunately Udemy courses cannot be published in UA-cam as it is a free platform. However, I will continue to publish videos in UA-cam covering individual topics that is useful for DBAs.

  • @edgardonb
    @edgardonb 3 роки тому

    Dude,,,,,
    how do you create the rule? I don't see where you relate it

    • @YouVolve
      @YouVolve  3 роки тому

      Hello Edgard, creating an incident ruleset is altogether a different topic which I am going to cover in another video. If you are using OEM, you already have at least one ruleset configured.

  • @oekpet4768
    @oekpet4768 3 роки тому

    Hello, how to send deadlock ?

    • @YouVolve
      @YouVolve  3 роки тому +2

      Hi Oek, thanks for your interest. I am working on uploading a video on that within next 2-3 weeks...

    • @oekpet4768
      @oekpet4768 3 роки тому

      @@YouVolve big thank

  • @anthoniangha6539
    @anthoniangha6539 2 роки тому

    I created a metrics extension using the V$RMAN_BACKUP_JOB_DETAILS and deployed it to all targets. I however is looking at the option to use this metrics to generate a daily backup report using the mgmt$metric_current view following Doc ID 1622443.1 and 2853134.1 Do you have a script for this?

    • @YouVolve
      @YouVolve  2 роки тому

      Hi Anthonia,
      I don't have a script ready for your purpose but you can use the SQL below:
      select target_name,value from sysman.mgmt$metric_current
      where metric_name like '' and
      column_label=''
      Please include other column in the SELECT list where you think useful.
      Hope this will help.