Author: yusaku
Date: Wed Apr 24 23:43:02 2013
New Revision: 1471783
URL: http://svn.apache.org/r1471783
Log:
AMBARI-2018. Hosts page: no filter selection is shown after clicking on
"Alerts" filter, navigating away, and coming back to Hosts page. (yusaku)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/assets/data/alerts/alerts.json
incubator/ambari/trunk/ambari-web/app/controllers/main/host.js
incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs
incubator/ambari/trunk/ambari-web/app/views/main/host.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1471783&r1=1471782&r2=1471783&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Wed Apr 24 23:43:02 2013
@@ -791,6 +791,9 @@ Trunk (unreleased changes):
BUG FIXES
+ AMBARI-2018. Hosts page: no filter selection is shown after clicking on
+ "Alerts" filter, navigating away, and coming back to Hosts page. (yusaku)
+
AMBARI-2016. Hide Maintenance pulldown if no operation can be performed.
(yusaku)
Modified: incubator/ambari/trunk/ambari-web/app/assets/data/alerts/alerts.json
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/assets/data/alerts/alerts.json?rev=1471783&r1=1471782&r2=1471783&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/assets/data/alerts/alerts.json
(original)
+++ incubator/ambari/trunk/ambari-web/app/assets/data/alerts/alerts.json Wed
Apr 24 23:43:02 2013
@@ -2,15 +2,15 @@
"href" :
"http://ec2-54-234-53-225.compute-1.amazonaws.com:8080/api/v1/clusters/test/host_components?HostRoles/component_name=NAGIOS_SERVER&fields=HostRoles/nagios_alerts",
"items" : [
{
- "href" :
"http://ec2-54-234-53-225.compute-1.amazonaws.com:8080/api/v1/clusters/test/hosts/ip-10-114-35-111.ec2.internal/host_components/NAGIOS_SERVER",
+ "href" :
"http://ec2-54-234-53-225.compute-1.amazonaws.com:8080/api/v1/clusters/test/hosts/ip-10-191-202-42.ec2.internal/host_components/NAGIOS_SERVER",
"HostRoles" : {
"cluster_name" : "test",
- "nagios_alerts" : {"alerts":[{"service_description":"Ganglia [gmetad]
Process
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.004 second response time on port
8651","last_hard_state_change":"1359058506","last_hard_state":"0","last_time_ok":"1359072006","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072006","service_type":"GANGLIA"},{"service_description":"Ganglia
collector [gmond] Process down alert for
hbasemaster","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.009 second response time on port
8663","last_hard_state_change":"1359058517","last_hard_state":"0","last_time_ok":"1359072002","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072002","service_type":"GANGLIA"},{"service_description":"Ganglia
collector [
gmond] Process down alert for
jobtracker","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.009 second response time on port
8662","last_hard_state_change":"1359058528","last_hard_state":"0","last_time_ok":"1359072013","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072013","service_type":"GANGLIA"},{"service_description":"Ganglia
collector [gmond] Process down alert for
namenode","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.004 second response time on port
8661","last_hard_state_change":"1359058540","last_hard_state":"0","last_time_ok":"1359072010","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072010","service_type":"GANGLIA"},{"service_description":"Ganglia
collector [gmond] Process down alert for slaves","host_name":"ip
-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.009 second response time on port
8660","last_hard_state_change":"1359058551","last_hard_state":"0","last_time_ok":"1359072006","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072006","service_type":"GANGLIA"},{"service_description":"Percent
region servers
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<1>,
affected:<0>","last_hard_state_change":"1359058802","last_hard_state":"0","last_time_ok":"1359072002","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058772","is_flapping":"0","last_check":"1359072002","service_type":"HBASE"},{"service_description":"HBase
Web UI
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Successfully accessed hbase Web UI"
,"last_hard_state_change":"1359058574","last_hard_state":"0","last_time_ok":"1359072014","last_time_warning":"1359058634","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072014","service_type":"HBASE"},{"service_description":"HBaseMaster
CPU
utilization","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"2
CPU, average load 14.0% < 200% :
OK","last_hard_state_change":"1359058585","last_hard_state":"0","last_time_ok":"1359071785","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071785","service_type":"HBASE"},{"service_description":"HBaseMaster
Process
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.000 second response time on port
60000","last_hard_state_change":"1359058596","last_hard_state":"0","last_time_ok":"1359071991","last_time_warning":"0","last_t
ime_unknown":"0","last_time_critical":"1359058626","is_flapping":"0","last_check":"1359071991","service_type":"HBASE"},{"service_description":"Corrupt\\/Missing
blocks","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
corrupt_blocks:<0>, missing_blocks:<0>,
total_blocks:<249>","last_hard_state_change":"1359058509","last_hard_state":"0","last_time_ok":"1359071949","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071949","service_type":"HDFS"},{"service_description":"HDFS
Capacity
utilization","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
DFSUsedGB:<0.1>,
DFSTotalGB:<784.4>","last_hard_state_change":"1359058520","last_hard_state":"0","last_time_ok":"1359071720","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071
720","service_type":"HDFS"},{"service_description":"Namenode RPC
Latency","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
RpcQueueTime_avg_time:<0> Secs, RpcProcessingTime_avg_time:<0>
Secs","last_hard_state_change":"1359058531","last_hard_state":"0","last_time_ok":"1359071731","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071731","service_type":"HDFS"},{"service_description":"Percent
DataNodes
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<1>,
affected:<0>","last_hard_state_change":"1359058543","last_hard_state":"0","last_time_ok":"1359072013","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072013","service_type":"HDFS"},{"service_description":"Percent
DataNodes storage full","host_name":"ip-10-114-
35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<1>,
affected:<0>","last_hard_state_change":"1359058554","last_hard_state":"0","last_time_ok":"1359071994","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071994","service_type":"HDFS"},{"service_description":"Percent
TaskTrackers
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<1>,
affected:<0>","last_hard_state_change":"1359058745","last_hard_state":"0","last_time_ok":"1359072005","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058715","is_flapping":"0","last_check":"1359072005","service_type":"MAPREDUCE"},{"service_description":"Nagios
status log
staleness","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"NAGIOS
OK: 2 processes, status log updated 9 se
conds
ago","last_hard_state_change":"1359058576","last_hard_state":"0","last_time_ok":"1359071776","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071776","service_type":"UNKNOWN"},{"service_description":"Namenode
Edit logs directory
status","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
All Namenode directories are
active","last_hard_state_change":"1359058588","last_hard_state":"0","last_time_ok":"1359071998","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071998","service_type":"HDFS"},{"service_description":"Namenode
Host CPU
utilization","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"2
CPU, average load 14.5% < 200% :
OK","last_hard_state_change":"1359058599","last_hard_state":"0","last_time_ok":"1359071799","last_time_warning":"0","l
ast_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071799","service_type":"HDFS"},{"service_description":"Namenode
Process
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.001 second response time on port
8020","last_hard_state_change":"1359058511","last_hard_state":"0","last_time_ok":"1359071996","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058511","is_flapping":"0","last_check":"1359071996","service_type":"HDFS"},{"service_description":"Namenode
Web UI
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Successfully accessed namenode Web
UI","last_hard_state_change":"1359058523","last_hard_state":"0","last_time_ok":"1359071963","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071963","service_type":"HDFS"},{"service_descript
ion":"ZKSERVERS Process
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.003 second response time on port
2181","last_hard_state_change":"1359058654","last_hard_state":"0","last_time_ok":"1359071974","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058594","is_flapping":"0","last_check":"1359071974","service_type":"UNKNOWN"},{"service_description":"Percent
zookeeper servers
down","host_name":"ip-10-114-35-111.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<3>,
affected:<0>","last_hard_state_change":"1359058545","last_hard_state":"0","last_time_ok":"1359072015","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072015","service_type":"ZOOKEEPER"},{"service_description":"HIVE-METASTORE
status
check","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state
":"0","plugin_output":"OK: Hive metaserver status
OK","last_hard_state_change":"1359058677","last_hard_state":"0","last_time_ok":"1359071997","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058647","is_flapping":"0","last_check":"1359071997","service_type":"HIVE"},{"service_description":"JobHistory
Web UI
down","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Successfully accessed jobhistory Web
UI","last_hard_state_change":"1359058568","last_hard_state":"0","last_time_ok":"1359072008","last_time_warning":"1359058628","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072008","service_type":"MAPREDUCE"},{"service_description":"JobTracker
Web UI
down","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Successfully accessed jobtracker Web
UI","last_hard_state_change":"1359058579","last_hard_state":"0","las
t_time_ok":"1359071959","last_time_warning":"1359058639","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071959","service_type":"MAPREDUCE"},{"service_description":"Jobtracker
CPU
utilization","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"2
CPU, average load 2.5% < 200% :
OK","last_hard_state_change":"1359058591","last_hard_state":"0","last_time_ok":"1359071791","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071791","service_type":"MAPREDUCE"},{"service_description":"Jobtracker
Process
down","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.064 second response time on port
50030","last_hard_state_change":"1359058677","last_hard_state":"0","last_time_ok":"1359071997","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058647","is_flapp
ing":"0","last_check":"1359071997","service_type":"MAPREDUCE"},{"service_description":"JobTracker
RPC
Latency","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
RpcQueueTime_avg_time:<0.2> Secs,
RpcProcessingTime_avg_time:<0.24>
Secs","last_hard_state_change":"1359058514","last_hard_state":"0","last_time_ok":"1359072014","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072014","service_type":"MAPREDUCE"},{"service_description":"Oozie
status
check","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Oozie server status [System mode:
NORMAL]","last_hard_state_change":"1359058826","last_hard_state":"0","last_time_ok":"1359071966","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058766","is_flapping":"0","last_check":"1359071966","service_type":"OOZIE"},{"service_descriptio
n":"WEBHCAT status
check","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"","last_hard_state_change":"1359058897","last_hard_state":"0","last_time_ok":"1359071977","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058837","is_flapping":"","last_check":"","service_type":"WEBHCAT"},{"service_description":"ZKSERVERS
Process
down","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.001 second response time on port
2181","last_hard_state_change":"1359058548","last_hard_state":"0","last_time_ok":"1359071988","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071988","service_type":"UNKNOWN"},{"service_description":"ZKSERVERS
Process
down","host_name":"ip-10-204-141-167.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.031 second response time on port 2
181","last_hard_state_change":"1359058559","last_hard_state":"0","last_time_ok":"1359071999","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071999","service_type":"UNKNOWN"},{"service_description":"Process
down","host_name":"ip-10-80-69-221.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.127 second response time on port
50010","last_hard_state_change":"1359058571","last_hard_state":"0","last_time_ok":"1359072011","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072011","service_type":"UNKNOWN"},{"service_description":"Storage
full","host_name":"ip-10-80-69-221.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Capacity:[], Remaining Capacity:[],
percent_full:[0]","last_hard_state_change":"1359058582","last_hard_state":"0","last_time_ok":"1359071782","last_time_warning":"0","last_time_unknown":"
0","last_time_critical":"0","is_flapping":"0","last_check":"1359071782","service_type":"UNKNOWN"},{"service_description":"Process
down","host_name":"ip-10-80-69-221.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.001 second response time on port
60020","last_hard_state_change":"1359058773","last_hard_state":"0","last_time_ok":"1359071973","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058713","is_flapping":"0","last_check":"1359071973","service_type":"UNKNOWN"},{"service_description":"Process
down","host_name":"ip-10-80-69-221.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.001 second response time on port
50060","last_hard_state_change":"1359058725","last_hard_state":"0","last_time_ok":"1359071985","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058665","is_flapping":"0","last_check":"1359071985","service_type":"UNKNOWN"}],"hostcounts":{"up_hosts":4,"
down_hosts":0},"servicestates":{"PUPPET":0,"HBASE":"0","HDFS":"0","ZOOKEEPER":0,"HIVE-METASTORE":"0","MAPREDUCE":"0","OOZIE":"0"}},
+ "nagios_alerts" : {"alerts":[{"service_description":"Ganglia [gmetad]
Process
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"1","plugin_output":"TCP
OK - 0.004 second response time on port
8651","last_hard_state_change":"1359058506","last_hard_state":"0","last_time_ok":"1359072006","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072006","service_type":"GANGLIA"},{"service_description":"Ganglia
collector [gmond] Process down alert for
hbasemaster","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.009 second response time on port
8663","last_hard_state_change":"1359058517","last_hard_state":"0","last_time_ok":"1359072002","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072002","service_type":"GANGLIA"},{"service_description":"Ganglia
collector [
gmond] Process down alert for
jobtracker","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.009 second response time on port
8662","last_hard_state_change":"1359058528","last_hard_state":"0","last_time_ok":"1359072013","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072013","service_type":"GANGLIA"},{"service_description":"Ganglia
collector [gmond] Process down alert for
namenode","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.004 second response time on port
8661","last_hard_state_change":"1359058540","last_hard_state":"0","last_time_ok":"1359072010","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072010","service_type":"GANGLIA"},{"service_description":"Ganglia
collector [gmond] Process down alert for slaves","host_name":"ip
-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.009 second response time on port
8660","last_hard_state_change":"1359058551","last_hard_state":"0","last_time_ok":"1359072006","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072006","service_type":"GANGLIA"},{"service_description":"Percent
region servers
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<1>,
affected:<0>","last_hard_state_change":"1359058802","last_hard_state":"0","last_time_ok":"1359072002","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058772","is_flapping":"0","last_check":"1359072002","service_type":"HBASE"},{"service_description":"HBase
Web UI
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Successfully accessed hbase Web UI"
,"last_hard_state_change":"1359058574","last_hard_state":"0","last_time_ok":"1359072014","last_time_warning":"1359058634","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072014","service_type":"HBASE"},{"service_description":"HBaseMaster
CPU
utilization","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"2
CPU, average load 14.0% < 200% :
OK","last_hard_state_change":"1359058585","last_hard_state":"0","last_time_ok":"1359071785","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071785","service_type":"HBASE"},{"service_description":"HBaseMaster
Process
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.000 second response time on port
60000","last_hard_state_change":"1359058596","last_hard_state":"0","last_time_ok":"1359071991","last_time_warning":"0","last_t
ime_unknown":"0","last_time_critical":"1359058626","is_flapping":"0","last_check":"1359071991","service_type":"HBASE"},{"service_description":"Corrupt\\/Missing
blocks","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
corrupt_blocks:<0>, missing_blocks:<0>,
total_blocks:<249>","last_hard_state_change":"1359058509","last_hard_state":"0","last_time_ok":"1359071949","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071949","service_type":"HDFS"},{"service_description":"HDFS
Capacity
utilization","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
DFSUsedGB:<0.1>,
DFSTotalGB:<784.4>","last_hard_state_change":"1359058520","last_hard_state":"0","last_time_ok":"1359071720","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071
720","service_type":"HDFS"},{"service_description":"Namenode RPC
Latency","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
RpcQueueTime_avg_time:<0> Secs, RpcProcessingTime_avg_time:<0>
Secs","last_hard_state_change":"1359058531","last_hard_state":"0","last_time_ok":"1359071731","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071731","service_type":"HDFS"},{"service_description":"Percent
DataNodes
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<1>,
affected:<0>","last_hard_state_change":"1359058543","last_hard_state":"0","last_time_ok":"1359072013","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072013","service_type":"HDFS"},{"service_description":"Percent
DataNodes storage full","host_name":"ip-10-191-
202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<1>,
affected:<0>","last_hard_state_change":"1359058554","last_hard_state":"0","last_time_ok":"1359071994","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071994","service_type":"HDFS"},{"service_description":"Percent
TaskTrackers
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<1>,
affected:<0>","last_hard_state_change":"1359058745","last_hard_state":"0","last_time_ok":"1359072005","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058715","is_flapping":"0","last_check":"1359072005","service_type":"MAPREDUCE"},{"service_description":"Nagios
status log
staleness","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"NAGIOS
OK: 2 processes, status log updated 9 se
conds
ago","last_hard_state_change":"1359058576","last_hard_state":"0","last_time_ok":"1359071776","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071776","service_type":"UNKNOWN"},{"service_description":"Namenode
Edit logs directory
status","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
All Namenode directories are
active","last_hard_state_change":"1359058588","last_hard_state":"0","last_time_ok":"1359071998","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071998","service_type":"HDFS"},{"service_description":"Namenode
Host CPU
utilization","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"2
CPU, average load 14.5% < 200% :
OK","last_hard_state_change":"1359058599","last_hard_state":"0","last_time_ok":"1359071799","last_time_warning":"0","l
ast_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071799","service_type":"HDFS"},{"service_description":"Namenode
Process
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.001 second response time on port
8020","last_hard_state_change":"1359058511","last_hard_state":"0","last_time_ok":"1359071996","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058511","is_flapping":"0","last_check":"1359071996","service_type":"HDFS"},{"service_description":"Namenode
Web UI
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Successfully accessed namenode Web
UI","last_hard_state_change":"1359058523","last_hard_state":"0","last_time_ok":"1359071963","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071963","service_type":"HDFS"},{"service_descript
ion":"ZKSERVERS Process
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.003 second response time on port
2181","last_hard_state_change":"1359058654","last_hard_state":"0","last_time_ok":"1359071974","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058594","is_flapping":"0","last_check":"1359071974","service_type":"UNKNOWN"},{"service_description":"Percent
zookeeper servers
down","host_name":"ip-10-191-202-42.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
total:<3>,
affected:<0>","last_hard_state_change":"1359058545","last_hard_state":"0","last_time_ok":"1359072015","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072015","service_type":"ZOOKEEPER"},{"service_description":"HIVE-METASTORE
status
check","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state
":"0","plugin_output":"OK: Hive metaserver status
OK","last_hard_state_change":"1359058677","last_hard_state":"0","last_time_ok":"1359071997","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058647","is_flapping":"0","last_check":"1359071997","service_type":"HIVE"},{"service_description":"JobHistory
Web UI
down","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Successfully accessed jobhistory Web
UI","last_hard_state_change":"1359058568","last_hard_state":"0","last_time_ok":"1359072008","last_time_warning":"1359058628","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072008","service_type":"MAPREDUCE"},{"service_description":"JobTracker
Web UI
down","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Successfully accessed jobtracker Web
UI","last_hard_state_change":"1359058579","last_hard_state":"0","las
t_time_ok":"1359071959","last_time_warning":"1359058639","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071959","service_type":"MAPREDUCE"},{"service_description":"Jobtracker
CPU
utilization","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"2
CPU, average load 2.5% < 200% :
OK","last_hard_state_change":"1359058591","last_hard_state":"0","last_time_ok":"1359071791","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071791","service_type":"MAPREDUCE"},{"service_description":"Jobtracker
Process
down","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.064 second response time on port
50030","last_hard_state_change":"1359058677","last_hard_state":"0","last_time_ok":"1359071997","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058647","is_flapp
ing":"0","last_check":"1359071997","service_type":"MAPREDUCE"},{"service_description":"JobTracker
RPC
Latency","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
RpcQueueTime_avg_time:<0.2> Secs,
RpcProcessingTime_avg_time:<0.24>
Secs","last_hard_state_change":"1359058514","last_hard_state":"0","last_time_ok":"1359072014","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072014","service_type":"MAPREDUCE"},{"service_description":"Oozie
status
check","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Oozie server status [System mode:
NORMAL]","last_hard_state_change":"1359058826","last_hard_state":"0","last_time_ok":"1359071966","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058766","is_flapping":"0","last_check":"1359071966","service_type":"OOZIE"},{"service_descriptio
n":"WEBHCAT status
check","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"","last_hard_state_change":"1359058897","last_hard_state":"0","last_time_ok":"1359071977","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058837","is_flapping":"","last_check":"","service_type":"WEBHCAT"},{"service_description":"ZKSERVERS
Process
down","host_name":"ip-10-12-194-214.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.001 second response time on port
2181","last_hard_state_change":"1359058548","last_hard_state":"0","last_time_ok":"1359071988","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071988","service_type":"UNKNOWN"},{"service_description":"ZKSERVERS
Process
down","host_name":"ip-10-204-141-167.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.031 second response time on port 2
181","last_hard_state_change":"1359058559","last_hard_state":"0","last_time_ok":"1359071999","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359071999","service_type":"UNKNOWN"},{"service_description":"Process
down","host_name":"ip-10-80-69-221.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.127 second response time on port
50010","last_hard_state_change":"1359058571","last_hard_state":"0","last_time_ok":"1359072011","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"0","is_flapping":"0","last_check":"1359072011","service_type":"UNKNOWN"},{"service_description":"Storage
full","host_name":"ip-10-80-69-221.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"OK:
Capacity:[], Remaining Capacity:[],
percent_full:[0]","last_hard_state_change":"1359058582","last_hard_state":"0","last_time_ok":"1359071782","last_time_warning":"0","last_time_unknown":"
0","last_time_critical":"0","is_flapping":"0","last_check":"1359071782","service_type":"UNKNOWN"},{"service_description":"Process
down","host_name":"ip-10-80-69-221.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.001 second response time on port
60020","last_hard_state_change":"1359058773","last_hard_state":"0","last_time_ok":"1359071973","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058713","is_flapping":"0","last_check":"1359071973","service_type":"UNKNOWN"},{"service_description":"Process
down","host_name":"ip-10-80-69-221.ec2.internal","current_attempt":"1","current_state":"0","plugin_output":"TCP
OK - 0.001 second response time on port
50060","last_hard_state_change":"1359058725","last_hard_state":"0","last_time_ok":"1359071985","last_time_warning":"0","last_time_unknown":"0","last_time_critical":"1359058665","is_flapping":"0","last_check":"1359071985","service_type":"UNKNOWN"}],"hostcounts":{"up_hosts":4,"
down_hosts":0},"servicestates":{"PUPPET":0,"HBASE":"0","HDFS":"0","ZOOKEEPER":0,"HIVE-METASTORE":"0","MAPREDUCE":"0","OOZIE":"0"}},
"component_name" : "NAGIOS_SERVER",
- "host_name" : "ip-10-114-35-111.ec2.internal"
+ "host_name" : "ip-10-191-202-42.ec2.internal"
},
"host" : {
- "href" :
"http://ec2-54-234-53-225.compute-1.amazonaws.com:8080/api/v1/clusters/test/hosts/ip-10-114-35-111.ec2.internal"
+ "href" :
"http://ec2-54-234-53-225.compute-1.amazonaws.com:8080/api/v1/clusters/test/hosts/ip-10-191-202-42.ec2.internal"
}
}
]
Modified: incubator/ambari/trunk/ambari-web/app/controllers/main/host.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/controllers/main/host.js?rev=1471783&r1=1471782&r2=1471783&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/controllers/main/host.js (original)
+++ incubator/ambari/trunk/ambari-web/app/controllers/main/host.js Wed Apr 24
23:43:02 2013
@@ -51,28 +51,6 @@ App.MainHostController = Em.ArrayControl
}.property('componentsForFilter'),
/**
- * Is true if alets filter is active
- */
- filteredByAlerts:false,
-
- /**
- * Is true if Hosts page was opened by clicking on alerts count badge
- */
- comeWithAlertsFilter: false,
-
- /**
- * Enable or disable filtering by alets
- */
- filterByAlerts: function () {
- if (App.router.get('currentState.name') == 'index') {
- this.set('filteredByAlerts', !this.get('filteredByAlerts'));
- } else {
- App.router.transitionTo('hosts.index');
- this.set('comeWithAlertsFilter', true);
- }
- },
-
- /**
* Filter hosts by componentName of <code>component</code>
* @param component App.HostComponent
*/
Modified: incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs?rev=1471783&r1=1471782&r2=1471783&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs (original)
+++ incubator/ambari/trunk/ambari-web/app/templates/main/host.hbs Wed Apr 24
23:43:02 2013
@@ -22,17 +22,17 @@
<div class="health-status-bar span8" >
{{#each category in view.categories}}
<span {{bindAttr class="category.itemClass"}}>
- <span {{bindAttr class="category.healthStatusValue"}}>
</span>
+ {{#if category.alerts}}
+ <span class="label label-important">{{t
hosts.host.alerts.st}}</span>
+ {{else}}
+ <span {{bindAttr class="category.healthStatusValue"}}>
</span>
+ {{/if}}
<a {{action selectCategory category target="view"}} href="#">
{{category.label}}
</a>
</span>
- |
+ {{#unless category.last}}|{{/unless}}
{{/each}}
- <span class="label label-important">{{t hosts.host.alerts.st}}</span>
- <span {{bindAttr class="controller.filteredByAlerts:active"}}>
- <a href="#" {{action filterByAlerts target="controller"}}>{{t
hosts.host.alerts.label}} ({{view.hostsWithAlertsCount}})</a>
- </span>
</div>
{{#if App.isAdmin}}
Modified: incubator/ambari/trunk/ambari-web/app/views/main/host.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/views/main/host.js?rev=1471783&r1=1471782&r2=1471783&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/views/main/host.js (original)
+++ incubator/ambari/trunk/ambari-web/app/views/main/host.js Wed Apr 24
23:43:02 2013
@@ -29,12 +29,6 @@ App.MainHostView = App.TableView.extend(
didInsertElement:function () {
this._super();
- if (this.get('controller.comeWithAlertsFilter')) {
- this.set('controller.comeWithAlertsFilter', false);
- this.set('controller.filteredByAlerts', true);
- } else {
- this.set('controller.filteredByAlerts', false);
- }
},
sortView: sort.wrapperView,
@@ -109,7 +103,10 @@ App.MainHostView = App.TableView.extend(
hostsCount: function () {
var statusString = this.get('healthStatusValue');
- if (statusString == "") {
+ var alerts = this.get('alerts');
+ if(alerts){
+ return
this.get('view.content').filterProperty('criticalAlertsCount').get('length');
+ } else if (statusString == "") {
return this.get('view.content').get('length');
} else {
return this.get('view.content').filterProperty('healthClass',
statusString ).get('length');
@@ -145,7 +142,8 @@ App.MainHostView = App.TableView.extend(
self.categoryObject.create({value:
Em.I18n.t('hosts.host.healthStatusCategory.green'), healthStatusValue:
'health-status-LIVE'}),
self.categoryObject.create({value:
Em.I18n.t('hosts.host.healthStatusCategory.red'), healthStatusValue:
'health-status-DEAD-RED'}),
self.categoryObject.create({value:
Em.I18n.t('hosts.host.healthStatusCategory.orange'), healthStatusValue:
'health-status-DEAD-ORANGE'}),
- self.categoryObject.create({value:
Em.I18n.t('hosts.host.healthStatusCategory.yellow'), healthStatusValue:
'health-status-DEAD-YELLOW', last: true })
+ self.categoryObject.create({value:
Em.I18n.t('hosts.host.healthStatusCategory.yellow'), healthStatusValue:
'health-status-DEAD-YELLOW'}),
+ self.categoryObject.create({value: Em.I18n.t('hosts.host.alerts.label'),
healthStatusValue: '', last: true, alerts: true })
];
this.set('category', categories.get('firstObject'));
@@ -157,17 +155,15 @@ App.MainHostView = App.TableView.extend(
selectCategory: function(event, context){
this.set('category', event.context);
- this.updateFilter(0, event.context.get('healthStatusValue'), 'string');
+ if(event.context.get('alerts')){
+ this.updateFilter(0, '', 'string');
+ this.updateFilter(7, '>0', 'number');
+ } else {
+ this.updateFilter(7, '', 'number');
+ this.updateFilter(0, event.context.get('healthStatusValue'), 'string');
+ }
},
- /**
- * Deactivate Alerts filtering if some Health category is selected
- */
- deactivateAlertsFilter: function() {
- if (this.get('category')) {
- this.set('controller.filteredByAlerts', false);
- }
- }.observes('category'),
/**
* Count of the hosts with alerts
@@ -176,26 +172,6 @@ App.MainHostView = App.TableView.extend(
return this.get('content.length') -
this.get('content').filterProperty('criticalAlertsCount', 0).length;
}.property('[email protected]'),
- /**
- * Filter hosts by hosts with at least one alert
- */
- filterByAlerts:function() {
- if (this.get('controller.filteredByAlerts')) {
- this.updateFilter(0, '', 'string');
- this.updateFilter(7, '>0', 'number');
- this.get('categories').setEach('isActive', false);
- this.set('category', false);
- }
- else {
- this.updateFilter(7, '', 'number');
- if (!this.get('category')) {
- var category = this.get('categories').objectAt(0);
- category.set('isActive', false);
- this.set('category', category);
- }
- }
- }.observes('controller.filteredByAlerts'),
-
/**
* Filter view for name column