> On 一月 6, 2017, 9:16 p.m., Aravindan Vijayan wrote: > > The hostname sent to AMS must match the hostname managed in Ambari Server. > > If we make this change in Flume sink, and the hostname is mixed case or > > upper case in Ambari Server, then the metrics not will be displayed. > > > > Did you happen to investigate why Ambari server has lower hostcase name > > while the actual hostname is in mixed/upper case? > > yao lei wrote: > Thanks for your reply. > Firstly,the hostnames of flume metrics sent by flume sink and stored in > ams hbase are actual hostnames,they are in mixed/upper/lower case. > Secondly,hostnames displayed on web client and registered in ambari > database are always lowcase. > when ambari web client want to show flume agent host level metrics ,it > will send a request to ams collector passed by a lowcase hostname by that > collector will query metrics record. > So if hostname in ams hbase is not lowcase,it will not match the passed > lowcase value > > yao lei wrote: > Hi Dmytro. > Could you give me any suggestion when you are available? > > Aravindan Vijayan wrote: > Hi Yao, > > Ideally, hostname case should not be changed in Ambari. Can you attach > the response to the following GET calls as JSON files? > > http://<AMBARI_SERVER_HOST>:8080/api/v1/hosts/ > http://<AMBARI_SERVER_HOST>:8080/api/v1/clusters/<CLUSTER_NAME>/hosts/ > > yao lei wrote: > Ok,each response as following : > 1.{ > "href" : "http://gg5:8080/api/v1/hosts", > "items" : [ > { > "href" : "http://gg5:8080/api/v1/hosts/gg3", > "Hosts" : { > "cluster_name" : "test", > "host_name" : "gg3" > } > }, > { > "href" : "http://gg5:8080/api/v1/hosts/gg5", > "Hosts" : { > "cluster_name" : "test", > "host_name" : "gg5" > } > } > ] > } > 2.{ > "href" : "http://gg5:8080/api/v1/clusters/test/hosts", > "items" : [ > { > "href" : "http://gg5:8080/api/v1/clusters/test/hosts/gg3", > "Hosts" : { > "cluster_name" : "test", > "host_name" : "gg3" > } > }, > { > "href" : "http://gg5:8080/api/v1/clusters/test/hosts/gg5", > "Hosts" : { > "cluster_name" : "test", > "host_name" : "gg5" > } > } > ] > } > > yao lei wrote: > Used Ambari is 2.4.2 > Actul hostnames configured in OS are GG3 and gg5 which are stored in > colomun HOSTNAME in table METRIC_RECORD.
Hi Aravindan, I find in AMBARI-6521 that hostname will be lowercase Please see https://issues.apache.org/jira/secure/attachment/12656190/AMBARI-6521.patch - yao ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/55173/#review160765 ----------------------------------------------------------- On 一月 9, 2017, 6:27 a.m., yao lei wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/55173/ > ----------------------------------------------------------- > > (Updated 一月 9, 2017, 6:27 a.m.) > > > Review request for Ambari, Dmytro Sen, Matt, Myroslav Papirkovskyy, and Sid > Wagle. > > > Bugs: AMBARI-19357 > https://issues.apache.org/jira/browse/AMBARI-19357 > > > Repository: ambari > > > Description > ------- > > If hostname of flume agent is uppercase or mixed-case?web client will not > show flume metrics normally. > This is because we will query metric records by lowercase hostname used in > ambari ,but the hostname in METRIC_RECORD is not lowercase (see attached > picture),so we will not get any records. > This patch amis to convert hostname of metric record of flume to lowercase > before inserting into ams hbase. > > > Diffs > ----- > > > ambari-metrics/ambari-metrics-flume-sink/src/main/java/org/apache/hadoop/metrics2/sink/flume/FlumeTimelineMetricsSink.java > c1b684b > > Diff: https://reviews.apache.org/r/55173/diff/ > > > Testing > ------- > > Manually Tested > > > Thanks, > > yao lei > >