You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by at...@apache.org on 2014/01/15 15:27:53 UTC
git commit: AMBARI-4300 Service tab: growing number of calls to
update alerts. (atkach)
Updated Branches:
refs/heads/trunk 736c5cf15 -> 4b4351ba4
AMBARI-4300 Service tab: growing number of calls to update alerts. (atkach)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4b4351ba
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4b4351ba
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4b4351ba
Branch: refs/heads/trunk
Commit: 4b4351ba4f9dfe7acba3cfc2a82ff8157028575e
Parents: 736c5cf
Author: atkach <at...@hortonworks.com>
Authored: Wed Jan 15 16:27:47 2014 +0200
Committer: atkach <at...@hortonworks.com>
Committed: Wed Jan 15 16:27:47 2014 +0200
----------------------------------------------------------------------
.../app/assets/data/alerts/HDP2/alerts.json | 688 -------------------
.../assets/data/alerts/HDP2/host_alerts.json | 176 +++++
.../assets/data/alerts/HDP2/service_alerts.json | 136 ++++
.../app/assets/data/hosts/HDP2/hosts.json | 9 +-
.../app/assets/data/services/HDP2/services.json | 91 +++
.../app/controllers/main/alerts_controller.js | 7 +-
ambari-web/app/utils/ajax.js | 4 +-
7 files changed, 418 insertions(+), 693 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/4b4351ba/ambari-web/app/assets/data/alerts/HDP2/alerts.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/alerts/HDP2/alerts.json b/ambari-web/app/assets/data/alerts/HDP2/alerts.json
deleted file mode 100644
index d54bf0a..0000000
--- a/ambari-web/app/assets/data/alerts/HDP2/alerts.json
+++ /dev/null
@@ -1,688 +0,0 @@
-{
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/host_components?fields=HostRoles/nagios_alerts&HostRoles/component_name=NAGIOS_SERVER",
- "items" : [
- {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com/host_components/NAGIOS_SERVER",
- "HostRoles" : {
- "cluster_name" : "c1",
- "component_name" : "NAGIOS_SERVER",
- "host_name" : "dev01.hortonworks.com",
- "nagios_alerts" : {
- "alerts" : [
- {
- "service_description" : "Check ambari-agent process",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: Ambari agent is running [PID:15240]",
- "last_hard_state_change" : "1375291083",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308183",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308183",
- "service_type" : "AMBARI"
- },
- {
- "service_description" : "DataNode process down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.016 second response time on port 50075",
- "last_hard_state_change" : "1375296186",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308426",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375294732",
- "is_flapping" : "0",
- "last_check" : "1375308426",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "DataNode storage full",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: Capacity:[52844687359], Remaining Capacity:[45285249024], percent_full:[14.305010991256]",
- "last_hard_state_change" : "1375291089",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308189",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308189",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "Ganglia Server [gmond] process down alert for HBase Master",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.002 second response time on port 8663",
- "last_hard_state_change" : "1375291092",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308426",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308426",
- "service_type" : "GANGLIA"
- },
- {
- "service_description" : "Ganglia Server [gmond] process down alert for History Server 2",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.001 second response time on port 8666",
- "last_hard_state_change" : "1375291095",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308420",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308420",
- "service_type" : "GANGLIA"
- },
- {
- "service_description" : "Ganglia Server [gmond] process down alert for JobTracker",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "4",
- "current_state" : "2",
- "plugin_output" : "Connection refused",
- "last_hard_state_change" : "1375291143",
- "last_hard_state" : "2",
- "last_time_ok" : "0",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375308423",
- "is_flapping" : "0",
- "last_check" : "1375308423",
- "service_type" : "GANGLIA"
- },
- {
- "service_description" : "Ganglia Server [gmond] process down alert for NameNode",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.006 second response time on port 8661",
- "last_hard_state_change" : "1375291101",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308426",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308426",
- "service_type" : "GANGLIA"
- },
- {
- "service_description" : "Ganglia Server [gmond] process down alert for NodeManager",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.002 second response time on port 8660",
- "last_hard_state_change" : "1375291104",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308416",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308416",
- "service_type" : "GANGLIA"
- },
- {
- "service_description" : "Ganglia Server [gmond] process down alert for ResourceManager",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.002 second response time on port 8664",
- "last_hard_state_change" : "1375291107",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308426",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308426",
- "service_type" : "GANGLIA"
- },
- {
- "service_description" : "Ganglia Server [gmond] process down alert for slaves",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.005 second response time on port 8660",
- "last_hard_state_change" : "1375291110",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308420",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308420",
- "service_type" : "GANGLIA"
- },
- {
- "service_description" : "Ganglia [gmetad] process down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.018 second response time on port 8651",
- "last_hard_state_change" : "1375291113",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308423",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308423",
- "service_type" : "GANGLIA"
- },
- {
- "service_description" : "Percent RegionServers down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "3",
- "current_state" : "2",
- "plugin_output" : "CRITICAL: total:<1>, affected:<1>",
- "last_hard_state_change" : "1375298856",
- "last_hard_state" : "2",
- "last_time_ok" : "1375298796",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375308426",
- "is_flapping" : "0",
- "last_check" : "1375308426",
- "service_type" : "HBASE"
- },
- {
- "service_description" : "HBase Master CPU utilization",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "1 CPU, load 22.0% < 200% : OK",
- "last_hard_state_change" : "1375291118",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308218",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308218",
- "service_type" : "HBASE"
- },
- {
- "service_description" : "HBase Master Web UI down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "3",
- "current_state" : "1",
- "plugin_output" : "WARNING: HBase Master web UI not accessible : http://dev01.hortonworks.com:60010/master-status",
- "last_hard_state_change" : "1375299171",
- "last_hard_state" : "1",
- "last_time_ok" : "1375298991",
- "last_time_warning" : "1375308411",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308411",
- "service_type" : "HBASE"
- },
- {
- "service_description" : "HBase Master process down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "4",
- "current_state" : "2",
- "plugin_output" : "Connection refused",
- "last_hard_state_change" : "1375299104",
- "last_hard_state" : "2",
- "last_time_ok" : "1375299029",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375308404",
- "is_flapping" : "0",
- "last_check" : "1375308404",
- "service_type" : "HBASE"
- },
- {
- "service_description" : "Corrupt/Missing blocks",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: corrupt_blocks:<>, missing_blocks:<>, total_blocks:<>",
- "last_hard_state_change" : "1375291127",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308407",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308407",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "HDFS capacity utilization",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: DFSUsedGB:<0.2>, DFSTotalGB:<42.4>",
- "last_hard_state_change" : "1375291130",
- "last_hard_state" : "0",
- "last_time_ok" : "1375307930",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375307930",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "NameNode RPC latency",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: RpcQueueTime_avg_time:<0> Secs, RpcProcessingTime_avg_time:<0> Secs",
- "last_hard_state_change" : "1375291133",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308233",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308233",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "Percent DataNodes down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: total:<1>, affected:<0>",
- "last_hard_state_change" : "1375296206",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308416",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375294782",
- "is_flapping" : "0",
- "last_check" : "1375308416",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "Percent DataNodes storage full",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: total:<1>, affected:<0>",
- "last_hard_state_change" : "1375291139",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308419",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308419",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "Hive Metastore status check",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: Hive metaserver status OK",
- "last_hard_state_change" : "1375291472",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308422",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375290048",
- "is_flapping" : "0",
- "last_check" : "1375308422",
- "service_type" : "HIVE"
- },
- {
- "service_description" : "History Server 2 CPU utilization",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "1 CPU, load 18.0% < 200% : OK",
- "last_hard_state_change" : "1375291145",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308245",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308245",
- "service_type" : "UNKNOWN"
- },
- {
- "service_description" : "History Server 2 RPC latency",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: RpcQueueTime_avg_time:<0> Secs, RpcProcessingTime_avg_time:<0> Secs",
- "last_hard_state_change" : "1375291148",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308248",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308248",
- "service_type" : "UNKNOWN"
- },
- {
- "service_description" : "History Server 2 Web UI down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: Successfully accessed historyserver2 Web UI",
- "last_hard_state_change" : "1375291511",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308371",
- "last_time_warning" : "1375295397",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308371",
- "service_type" : "UNKNOWN"
- },
- {
- "service_description" : "Percent TaskTrackers down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: total:<0>, affected:<0>",
- "last_hard_state_change" : "1375291153",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308403",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308403",
- "service_type" : "MAPREDUCE"
- },
- {
- "service_description" : "Nagios status log staleness",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "NAGIOS OK: 2 processes, status log updated 5 seconds ago",
- "last_hard_state_change" : "1375291156",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308256",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308256",
- "service_type" : "NAGIOS"
- },
- {
- "service_description" : "NameNode Web UI down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: Successfully accessed namenode Web UI",
- "last_hard_state_change" : "1375296199",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308379",
- "last_time_warning" : "1375294745",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308379",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "NameNode edit logs directory status",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: All Namenode directories are active",
- "last_hard_state_change" : "1375296202",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308412",
- "last_time_warning" : "1375294778",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308412",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "NameNode host CPU utilization",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "1 CPU, load 26.0% < 200% : OK",
- "last_hard_state_change" : "1375291165",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308265",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308265",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "NameNode process down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.000 second response time on port 8020",
- "last_hard_state_change" : "1375296208",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308418",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375294784",
- "is_flapping" : "0",
- "last_check" : "1375308418",
- "service_type" : "HDFS"
- },
- {
- "service_description" : "NodeManager process down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.001 second response time on port 8042",
- "last_hard_state_change" : "1375296571",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308391",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375295117",
- "is_flapping" : "0",
- "last_check" : "1375308391",
- "service_type" : "UNKNOWN"
- },
- {
- "service_description" : "Oozie Server status check",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: Oozie server status [System mode: NORMAL]",
- "last_hard_state_change" : "1375291534",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308394",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375295660",
- "is_flapping" : "0",
- "last_check" : "1375308394",
- "service_type" : "OOZIE"
- },
- {
- "service_description" : "RegionServer process down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "3",
- "current_state" : "2",
- "plugin_output" : "Connection refused",
- "last_hard_state_change" : "1375298857",
- "last_hard_state" : "2",
- "last_time_ok" : "1375297343",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375308397",
- "is_flapping" : "0",
- "last_check" : "1375308397",
- "service_type" : "HBASE"
- },
- {
- "service_description" : "ResourceManager CPU utilization",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "1 CPU, load 24.0% < 200% : OK",
- "last_hard_state_change" : "1375291180",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308281",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308281",
- "service_type" : "UNKNOWN"
- },
- {
- "service_description" : "ResourceManager RPC latency",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: RpcQueueTime_avg_time:<0> Secs, RpcProcessingTime_avg_time:<0> Secs",
- "last_hard_state_change" : "1375291183",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308283",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308283",
- "service_type" : "UNKNOWN"
- },
- {
- "service_description" : "ResourceManager Web UI down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: Successfully accessed resorcemanager Web UI",
- "last_hard_state_change" : "1375296526",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308406",
- "last_time_warning" : "1375295072",
- "last_time_unknown" : "0",
- "last_time_critical" : "0",
- "is_flapping" : "0",
- "last_check" : "1375308406",
- "service_type" : "UNKNOWN"
- },
- {
- "service_description" : "WebHCat Server status check",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "",
- "last_hard_state_change" : "1375291969",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308409",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375290515",
- "is_flapping" : "",
- "last_check" : "",
- "service_type" : "WEBHCAT"
- },
- {
- "service_description" : "Percent ZooKeeper Servers down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "OK: total:<1>, affected:<0>",
- "last_hard_state_change" : "1375291461",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308411",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375290037",
- "is_flapping" : "0",
- "last_check" : "1375308411",
- "service_type" : "ZOOKEEPER"
- },
- {
- "service_description" : "ZooKeeper Server process down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.001 second response time on port 2181",
- "last_hard_state_change" : "1375291434",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308415",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375289980",
- "is_flapping" : "0",
- "last_check" : "1375308415",
- "service_type" : "ZOOKEEPER"
- },
- {
- "service_description" : "Falcon Server process down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.001 second response time on port 16000",
- "last_hard_state_change" : "1375291434",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308415",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375289980",
- "is_flapping" : "0",
- "last_check" : "1375308415",
- "service_type" : "FALCON"
- },
- {
- "service_description" : "Storm process down",
- "host_name" : "dev01.hortonworks.com",
- "current_attempt" : "1",
- "current_state" : "0",
- "plugin_output" : "TCP OK - 0.001 second response time on port 2181",
- "last_hard_state_change" : "1375291434",
- "last_hard_state" : "0",
- "last_time_ok" : "1375308415",
- "last_time_warning" : "0",
- "last_time_unknown" : "0",
- "last_time_critical" : "1375289980",
- "is_flapping" : "0",
- "last_check" : "1375308415",
- "service_type" : "STORM"
- }
- ],
- "hostcounts" : {
- "up_hosts" : "1",
- "down_hosts" : "0"
- },
- "servicestates" : {
- "PUPPET" : "0",
- "HIVE-METASTORE" : "0",
- "HDFS" : "0",
- "OOZIE" : "0",
- "WEBHCAT" : "0",
- "ZOOKEEPER" : "0"
- }
- }
- },
- "host" : {
- "href" : "http://dev01.hortonworks.com:8080/api/v1/clusters/c1/hosts/dev01.hortonworks.com"
- }
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4b4351ba/ambari-web/app/assets/data/alerts/HDP2/host_alerts.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/alerts/HDP2/host_alerts.json b/ambari-web/app/assets/data/alerts/HDP2/host_alerts.json
new file mode 100644
index 0000000..cce43d9
--- /dev/null
+++ b/ambari-web/app/assets/data/alerts/HDP2/host_alerts.json
@@ -0,0 +1,176 @@
+{
+ "href" : "http://192.168.56.101:8080/api/v1/clusters/cl/hosts/dev01.hortonworks.com?fields=alerts",
+ "Hosts" : {
+ "cluster_name" : "cl",
+ "host_name" : "dev01.hortonworks.com"
+ },
+ "alerts" : {
+ "detail" : [
+ {
+ "description" : "DataNode process",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787817,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793888,
+ "output" : "Connection refused"
+ },
+ {
+ "description" : "DataNode space",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787957,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793657,
+ "output" : "CRITICAL: Data inaccessible, Status code = 0"
+ },
+ {
+ "description" : "Blocks health",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787835,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793835,
+ "output" : "CRITICAL: Data inaccessible, Status code = 0"
+ },
+ {
+ "description" : "HDFS capacity utilization",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787844,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793845,
+ "output" : "CRITICAL: Data inaccessible, Status code = 0"
+ },
+ {
+ "description" : "NameNode RPC latency on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389788086,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793786,
+ "output" : "CRITICAL: Data inaccessible, Status code = 0"
+ },
+ {
+ "description" : "Percent DataNodes live",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787862,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793891,
+ "output" : "CRITICAL: total:<1>, affected:<1>"
+ },
+ {
+ "description" : "Percent DataNodes with space available",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787984,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793864,
+ "output" : "CRITICAL: total:<1>, affected:<1>"
+ },
+ {
+ "description" : "NameNode process on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787234,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793891,
+ "output" : "Connection refused"
+ },
+ {
+ "description" : "Secondary NameNode process",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787243,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793891,
+ "output" : "Connection refused"
+ },
+ {
+ "description" : "NameNode Web UI on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "WARNING",
+ "last_status_time" : 1389788062,
+ "service_name" : "HDFS",
+ "status" : "WARNING",
+ "status_time" : 1389793887,
+ "output" : "WARNING: NameNode Web UI not accessible : http://dev01.hortonworks.com:50070"
+ },
+ {
+ "description" : "NameNode edit logs directory status on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "WARNING",
+ "last_status_time" : 1389788011,
+ "service_name" : "HDFS",
+ "status" : "WARNING",
+ "status_time" : 1389793891,
+ "output" : "WARNING: NameNode directory status not available via http://dev01.hortonworks.com:50070/jmx url, code 0"
+ },
+ {
+ "description" : "Ambari Agent process",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "OK",
+ "last_status_time" : 1389636436,
+ "service_name" : "AMBARI",
+ "status" : "OK",
+ "status_time" : 1389793887,
+ "output" : "TCP OK - 0.001 second response time on port 8670"
+ },
+ {
+ "description" : "Nagios status log freshness",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "OK",
+ "last_status_time" : 1389636508,
+ "service_name" : "NAGIOS",
+ "status" : "OK",
+ "status_time" : 1389793693,
+ "output" : "NAGIOS OK: 2 processes, status log updated 2 seconds ago"
+ },
+ {
+ "description" : "NameNode host CPU utilization on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "OK",
+ "last_status_time" : 1389636534,
+ "service_name" : "HDFS",
+ "status" : "OK",
+ "status_time" : 1389793660,
+ "output" : "1 CPU, load 17.0% < 200% : OK"
+ },
+ {
+ "description" : "Percent ZooKeeper Servers live",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "OK",
+ "last_status_time" : 1389636561,
+ "service_name" : "ZOOKEEPER",
+ "status" : "OK",
+ "status_time" : 1389793891,
+ "output" : "OK: total:<1>, affected:<0>"
+ },
+ {
+ "description" : "ZooKeeper Server process",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "OK",
+ "last_status_time" : 1389636570,
+ "service_name" : "ZOOKEEPER",
+ "status" : "OK",
+ "status_time" : 1389793887,
+ "output" : "TCP OK - 0.001 second response time on port 2181"
+ }
+ ],
+ "summary" : {
+ "CRITICAL" : 9,
+ "OK" : 5,
+ "WARNING" : 2
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/4b4351ba/ambari-web/app/assets/data/alerts/HDP2/service_alerts.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/alerts/HDP2/service_alerts.json b/ambari-web/app/assets/data/alerts/HDP2/service_alerts.json
new file mode 100644
index 0000000..5820c22
--- /dev/null
+++ b/ambari-web/app/assets/data/alerts/HDP2/service_alerts.json
@@ -0,0 +1,136 @@
+{
+ "href" : "http://192.168.56.101:8080/api/v1/clusters/cl/services/HDFS?fields=alerts",
+ "ServiceInfo" : {
+ "cluster_name" : "cl",
+ "service_name" : "HDFS"
+ },
+ "alerts" : {
+ "detail" : [
+ {
+ "description" : "DataNode process",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787817,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793168,
+ "output" : "Connection refused"
+ },
+ {
+ "description" : "DataNode space",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787957,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793057,
+ "output" : "CRITICAL: Data inaccessible, Status code = 0"
+ },
+ {
+ "description" : "Blocks health",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787835,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793115,
+ "output" : "CRITICAL: Data inaccessible, Status code = 0"
+ },
+ {
+ "description" : "HDFS capacity utilization",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787844,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389792645,
+ "output" : "CRITICAL: Data inaccessible, Status code = 0"
+ },
+ {
+ "description" : "NameNode RPC latency on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389788086,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389792886,
+ "output" : "CRITICAL: Data inaccessible, Status code = 0"
+ },
+ {
+ "description" : "Percent DataNodes live",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787862,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793171,
+ "output" : "CRITICAL: total:<1>, affected:<1>"
+ },
+ {
+ "description" : "Percent DataNodes with space available",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787984,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793144,
+ "output" : "CRITICAL: total:<1>, affected:<1>"
+ },
+ {
+ "description" : "NameNode process on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787234,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793171,
+ "output" : "Connection refused"
+ },
+ {
+ "description" : "Secondary NameNode process",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "CRITICAL",
+ "last_status_time" : 1389787243,
+ "service_name" : "HDFS",
+ "status" : "CRITICAL",
+ "status_time" : 1389793171,
+ "output" : "Connection refused"
+ },
+ {
+ "description" : "NameNode Web UI on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "WARNING",
+ "last_status_time" : 1389788062,
+ "service_name" : "HDFS",
+ "status" : "WARNING",
+ "status_time" : 1389793167,
+ "output" : "WARNING: NameNode Web UI not accessible : http://dev01.hortonworks.com:50070"
+ },
+ {
+ "description" : "NameNode edit logs directory status on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "WARNING",
+ "last_status_time" : 1389788011,
+ "service_name" : "HDFS",
+ "status" : "WARNING",
+ "status_time" : 1389793171,
+ "output" : "WARNING: NameNode directory status not available via http://dev01.hortonworks.com:50070/jmx url, code 0"
+ },
+ {
+ "description" : "NameNode host CPU utilization on dev01.hortonworks.com",
+ "host_name" : "dev01.hortonworks.com",
+ "last_status" : "OK",
+ "last_status_time" : 1389636534,
+ "service_name" : "HDFS",
+ "status" : "OK",
+ "status_time" : 1389793060,
+ "output" : "1 CPU, load 19.0% < 200% : OK"
+ }
+ ],
+ "summary" : {
+ "CRITICAL" : 9,
+ "OK" : 1,
+ "WARNING" : 2
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/4b4351ba/ambari-web/app/assets/data/hosts/HDP2/hosts.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/hosts/HDP2/hosts.json b/ambari-web/app/assets/data/hosts/HDP2/hosts.json
index 608c23c..0626a35 100644
--- a/ambari-web/app/assets/data/hosts/HDP2/hosts.json
+++ b/ambari-web/app/assets/data/hosts/HDP2/hosts.json
@@ -300,7 +300,14 @@
"host_name" : "dev01.hortonworks.com"
}
}
- ]
+ ],
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 9,
+ "OK" : 5,
+ "WARNING" : 2
+ }
+ }
}
]
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/4b4351ba/ambari-web/app/assets/data/services/HDP2/services.json
----------------------------------------------------------------------
diff --git a/ambari-web/app/assets/data/services/HDP2/services.json b/ambari-web/app/assets/data/services/HDP2/services.json
index 4489757..32bfbda 100644
--- a/ambari-web/app/assets/data/services/HDP2/services.json
+++ b/ambari-web/app/assets/data/services/HDP2/services.json
@@ -6,6 +6,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "GANGLIA"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -13,6 +20,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "HBASE"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -20,6 +34,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "HCATALOG"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -27,6 +48,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "HDFS"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 9,
+ "OK" : 1,
+ "WARNING" : 2
+ }
}
},
{
@@ -34,6 +62,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "MAPREDUCE2"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -41,6 +76,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "NAGIOS"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -48,6 +90,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "OOZIE"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -55,6 +104,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "SQOOP"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -62,6 +118,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "PIG"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -69,6 +132,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "YARN"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -76,6 +146,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "ZOOKEEPER"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -83,6 +160,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "FALCON"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
},
{
@@ -90,6 +174,13 @@
"ServiceInfo" : {
"cluster_name" : "cl",
"service_name" : "STORM"
+ },
+ "alerts" : {
+ "summary" : {
+ "CRITICAL" : 0,
+ "OK" : 0,
+ "WARNING" : 0
+ }
}
}
]
http://git-wip-us.apache.org/repos/asf/ambari/blob/4b4351ba/ambari-web/app/controllers/main/alerts_controller.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/main/alerts_controller.js b/ambari-web/app/controllers/main/alerts_controller.js
index d599be1..bca7660 100644
--- a/ambari-web/app/controllers/main/alerts_controller.js
+++ b/ambari-web/app/controllers/main/alerts_controller.js
@@ -28,6 +28,7 @@ App.MainAlertsController = Em.Controller.extend({
resourceName: null,
//"HOST" or "SERVICE"
resourceType: null,
+ updateTimer: null,
/**
* load alerts for service or host
@@ -46,10 +47,12 @@ App.MainAlertsController = Em.Controller.extend({
update: function () {
var self = this;
if (this.get('isUpdating')) {
- setTimeout(function () {
+ this.set('updateTimer', setTimeout(function () {
self.getFromServer();
self.update();
- }, App.componentsUpdateInterval);
+ }, App.componentsUpdateInterval));
+ } else {
+ clearTimeout(this.get('updateTimer'));
}
}.observes('isUpdating'),
http://git-wip-us.apache.org/repos/asf/ambari/blob/4b4351ba/ambari-web/app/utils/ajax.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/utils/ajax.js b/ambari-web/app/utils/ajax.js
index a09499b..38663d7 100644
--- a/ambari-web/app/utils/ajax.js
+++ b/ambari-web/app/utils/ajax.js
@@ -32,11 +32,11 @@ var App = require('app');
var urls = {
'alerts.get_by_service': {
'real': '/clusters/{clusterName}/services/{serviceName}?fields=alerts',
- 'mock': '/data/background_operations/list_on_start.json'
+ 'mock': '/data/alerts/HDP2/service_alerts.json'
},
'alerts.get_by_host': {
'real': '/clusters/{clusterName}/hosts/{hostName}?fields=alerts',
- 'mock': '/data/background_operations/list_on_start.json'
+ 'mock': '/data/alerts/HDP2/host_alerts.json'
},
'background_operations.get_most_recent': {
'real': '/clusters/{clusterName}/requests?to=end&page_size=10&fields=Requests',