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

Add error logs to script alerts when there are failures

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.1.2
    • 2.2.0
    • alerts
    • None

    Description

      In general, the script alerts need logging to cover error scenarios.

      For example:
      ambari-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/alerts/alert_webhcat_server.py

            json_response = json.loads(stdout)
          except Exception, exception:
            return (RESULT_CODE_CRITICAL, [str(exception) + str(stdout)])
      

      If the response is not a valid JSON Ambari should log the content rather than just reporting that json could not be parsed through the alert text.

      Similar enhancements may be needed in several script based alerts. At least, lets cover all the three alert scripts that are in HIVE.

      Attachments

        1. AMBARI-13905-trunk.patch
          15 kB
          Dmytro Sen

        Issue Links

          Activity

            People

              dsen Dmytro Sen
              dsen Dmytro Sen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: