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

Ambari HDFS Metric alerts turns to UNKNOWN status with error "argument of type 'NoneType' is not iterable"

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 2.5.0
    • 2.5.0
    • alerts
    • None

    Description

      Build used : ambari-2.5.0.0-724

      Test is updating the alert definition minimumValue to "0.0".
      Payload used to update the minimumValue

      /{
      	"AlertDefinition": {
      		"cluster_name": "cl1",
      		"id": 81,
      		"name": "increase_nn_heap_usage_daily",
      		"label": "NameNode Heap Usage (Daily)",
      		"component_name": "NAMENODE",
      		"description": "This service-level alert is triggered if the NameNode heap usage deviation has grown beyond the specified threshold within a day period.",
      		"enabled": true,
      		"ignore_host": false,
      		"interval": 1,
      		"scope": "ANY",
      		"service_name": "HDFS",
      		"source": {
      			"parameters": [{
      				"name": "mergeHaMetrics",
      				"display_name": "Whether active and stanby NameNodes metrics should be merged",
      				"value": "false",
      				"description": "Whether active and stanby NameNodes metrics should be merged.",
      				"type": "STRING",
      				"visibility": "HIDDEN"
      			}, {
      				"name": "interval",
      				"display_name": "Time interval in minutes",
      				"value": "1440.0",
      				"description": "Time interval in minutes.",
      				"type": "NUMERIC",
      				"visibility": "HIDDEN"
      			}, {
      				"name": "appId",
      				"display_name": "AMS application id",
      				"value": "NAMENODE",
      				"description": "The application id used to retrieve the metric.",
      				"type": "STRING",
      				"visibility": "HIDDEN"
      			}, {
      				"name": "metricName",
      				"display_name": "Metric Name",
      				"value": "jvm.JvmMetrics.MemHeapUsedM",
      				"description": "The metric to monitor.",
      				"type": "STRING",
      				"visibility": "HIDDEN"
      			}, {
      				"name": "metric.deviation.warning.threshold",
      				"display_name": "Growth Rate",
      				"value": "20.0",
      				"description": "The percentage of NameNode heap usage growth.",
      				"type": "PERCENT"
      			}, {
      				"name": "metric.deviation.critical.threshold",
      				"display_name": "Growth Rate",
      				"value": "50.0",
      				"description": "The percentage of NameNode heap usage growth.",
      				"type": "PERCENT"
      			}, {
      				"name": "metric.units",
      				"display_name": "Metric Units",
      				"value": "MB",
      				"description": "The units that the metric data points are reported in.",
      				"type": "STRING",
      				"visibility": "HIDDEN"
      			}, {
      				"name": "minimumValue",
      				"display_name": "Minimum Heap",
      				"value": "0.0",
      				"description": "The minimum heap increase in a day.",
      				"type": "NUMERIC"
      			}],
      			"path": "HDFS/2.1.0.2.0/package/alerts/alert_metrics_deviation.py",
      			"type": "SCRIPT"
      		}
      	}
      }
      

      Alert response :

      03:14:20 AM 01-25-2017 AmbariItems FINE - API call response:{
        "href" : "http://172.27.9.139:8080/api/v1/clusters/cl1/alerts/119",
        "Alert" : {
          "cluster_name" : "cl1",
          "component_name" : "NAMENODE",
          "definition_id" : 81,
          "definition_name" : "increase_nn_heap_usage_daily",
          "firmness" : "HARD",
          "host_name" : "ctr-e126-1485243696039-2656-01-000006.hwx.site",
          "id" : 119,
          "instance" : null,
          "label" : "NameNode Heap Usage (Daily)",
          "latest_timestamp" : 1485314039820,
          "maintenance_state" : "OFF",
          "occurrences" : 13,
          "original_timestamp" : 1485313319818,
          "repeat_tolerance" : 1,
          "repeat_tolerance_remaining" : 0,
          "scope" : "ANY",
          "service_name" : "HDFS",
          "state" : "UNKNOWN",
          "text" : "argument of type 'NoneType' is not iterable"
        }
      }
      

      Note : Test used to pass consistently.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment