Traceback (most recent call last): File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py", line 184, in <module> AMSServiceCheck().execute() File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute method(env) File "/usr/lib/python2.6/site-packages/ambari_commons/os_family_impl.py", line 89, in thunk return fn(*args, **kwargs) File "/var/lib/ambari-agent/cache/common-services/AMBARI_METRICS/0.1.0/package/scripts/service_check.py", line 102, in service_check raise Fail("Metrics were not saved. Service check has failed. " resource_management.core.exceptions.Fail: Metrics were not saved. Service check has failed. Connection failed.
If you are using Prior to Ambari 2.4.0 then please upgrade to 2.4.1 or later (also upgrade the ams packages). You are hitting an issue siilar to the one mentioned here:
https://issues.apache.org/jira/browse/AMBARI-17512 (Failed to Check Ambari Metrics)
What is the state of Metrics collector on the cluster? Are you able to see graphs? Please share AMS logs (/var/log/ambari-metrics-collector/) and configs (/etc/ambari-metrics-collector/conf/).