Parcourir la source

AMBARI-6805. Flume: Alert should not show up as warning if there are no agents configured on the host (ncole)

Nate Cole il y a 10 ans
Parent
commit
9293ae9409

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/FLUME/package/scripts/flume_handler.py

@@ -68,7 +68,7 @@ class FlumeHandler(Script):
     alert['label'] = 'Flume Agent process'
 
     if len(processes) == 0 and len(expected_agents) == 0:
-      alert['state'] = 'WARNING'
+      alert['state'] = 'OK'
 
       if not params.hostname is None:
         alert['text'] = 'No agents defined on ' + params.hostname

+ 1 - 1
ambari-server/src/test/python/stacks/2.0.6/FLUME/test_flume.py

@@ -98,7 +98,7 @@ class TestFlumeHandler(RMFTestCase):
     # test that the method was called with empty processes
     self.assertTrue(structured_out_mock.called)
     structured_out_mock.assert_called_with({'processes': [],
-      'alerts': [{'text': 'No agents defined on c6401.ambari.apache.org', 'state': 'WARNING', 'name': 'flume_agent', 'label': 'Flume Agent process'}]})
+      'alerts': [{'text': 'No agents defined on c6401.ambari.apache.org', 'state': 'OK', 'name': 'flume_agent', 'label': 'Flume Agent process'}]})
     self.assertNoMoreResources()
 
   @patch("resource_management.libraries.script.Script.put_structured_out")