Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-10249

Add a Log Appender for Alert State Change Events

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: ambari-server
    • Labels:
      None

      Description

      Currently there is no permanent audit trail for alert state change events. Although the history and notifications of an alert are kept in the database, a deletion of the alert definition will cascade to its children, thus removing the history.

      Similar to ambari.config-changes.file, create a new logger that logs the following information:

      • Alert state changed events
        • date, state, name, threshold values (if any), text, instance, label
      ambari.alert-state-changes.file=ambari-alert-state-changes.log
      
      # Log config changes
      log4j.logger.alerts=INFO,alerts
      log4j.additivity.alerts=false
      log4j.appender.alerts=org.apache.log4j.FileAppender
      log4j.appender.alerts.File=${ambari.log.dir}/${ambari.alert-state-changes.file}
      log4j.appender.alerts.layout=org.apache.log4j.PatternLayout
      log4j.appender.alerts.layout.ConversionPattern=%d{ISO8601} %5p - %m%n
      
      private static final Logger alertLogger = LoggerFactory.getLogger("alerts");
      

        Issue Links

          Activity

          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Ambari-trunk-Commit #2134 (See https://builds.apache.org/job/Ambari-trunk-Commit/2134/)
          AMBARI-10249 - Add a Log Appender for Alert State Change Events (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=4872d4e80aff3e80bc61f82d25c3af1672a6bd32)

          • ambari-server/conf/windows/log4j.properties
          • ambari-server/conf/unix/log4j.properties
          • ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertStateChangedListener.java
          • ambari-server/conf/log4j.properties
          • ambari-server/src/main/conf/log4j.properties
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Ambari-trunk-Commit #2134 (See https://builds.apache.org/job/Ambari-trunk-Commit/2134/ ) AMBARI-10249 - Add a Log Appender for Alert State Change Events (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=4872d4e80aff3e80bc61f82d25c3af1672a6bd32 ) ambari-server/conf/windows/log4j.properties ambari-server/conf/unix/log4j.properties ambari-server/src/main/java/org/apache/ambari/server/events/listeners/alerts/AlertStateChangedListener.java ambari-server/conf/log4j.properties ambari-server/src/main/conf/log4j.properties
          Hide
          hudson Hudson added a comment -

          FAILURE: Integrated in Ambari-trunk-Commit #2137 (See https://builds.apache.org/job/Ambari-trunk-Commit/2137/)
          AMBARI-10249 - Add a Log Appender for Alert State Change Events (part2) (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=9a9492d7ae14851df919303c9d4fa859cb018b9d)

          • ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java
          Show
          hudson Hudson added a comment - FAILURE: Integrated in Ambari-trunk-Commit #2137 (See https://builds.apache.org/job/Ambari-trunk-Commit/2137/ ) AMBARI-10249 - Add a Log Appender for Alert State Change Events (part2) (jonathanhurley) (jhurley: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=9a9492d7ae14851df919303c9d4fa859cb018b9d ) ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java

            People

            • Assignee:
              jonathan.hurley Jonathan Hurley
              Reporter:
              jonathan.hurley Jonathan Hurley
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development