Support Questions
Find answers, ask questions, and share your expertise

Grafana Dashboard Init Failed when looking at some Ambari Metrics

Highlighted

Grafana Dashboard Init Failed when looking at some Ambari Metrics

Explorer

I just installed Grafana and while attempting to look at some of the canned dashboards I see the following error : Dashboard init failed Template variables could not be initialized: comp.forEach is not a function. (In 'comp.forEach', 'comp.forEach' is undefined)

I'm also unable to see data per host.

5 REPLIES 5
Highlighted

Re: Grafana Dashboard Init Failed when looking at some Ambari Metrics

Expert Contributor

@Mark Cohen

Is the metrics collector component up and running?

Which dashboard you are on, when you see this error?

Highlighted

Re: Grafana Dashboard Init Failed when looking at some Ambari Metrics

Explorer

@Aravindan Vijayan All of the metrics components are up and running. The dashboards I see the failure on are all for HDFS (HDFS - DataNodes, HDFS - Home, HDFS - NameNodes), and YARN (YARN - NodeManagers, YARN - Queues, YARN - ResourceManager)

Highlighted

Re: Grafana Dashboard Init Failed when looking at some Ambari Metrics

Expert Contributor

@Mark Cohen

On Ambari UI, do you see metrics in all the graphs in HDFS, Yarn service pages?

Please share the response of

http://<METRICS_COLLECTOR_HOST>:6188/ws/v1/timeline/metrics/metadata

http://<METRICS_COLLECTOR_HOST>:6188/ws/v1/timeline/metrics/hosts

Please share AMS collector log - /var/log/ambari-metrics-collector/ambari-metrics-collector.log

Highlighted

Re: Grafana Dashboard Init Failed when looking at some Ambari Metrics

Explorer

{"timestamp":0,"starttime":0,"metrics":{}}

It'a a large log, how many lines would you like. Do you want to see INFO,WARN or ?? Basically the info looks like this :

2016-12-21 17:18:52,910 INFO TimelineMetricHostAggregatorMinute: Last check point time: 1482358431510, lagBy: 301 seconds.

2016-12-21 17:18:52,910 INFO TimelineMetricHostAggregatorMinute: Start aggregation cycle @ Wed Dec 21 17:18:52 EST 2016, startTime = Wed Dec 21 17:13:51 EST 2016, endTime = Wed Dec 21 17:18:51 EST 2016

2016-12-21 17:18:54,623 INFO TimelineClusterAggregatorMinute: Last check point time: 1482358431513, lagBy: 303 seconds.

2016-12-21 17:18:54,623 INFO TimelineClusterAggregatorMinute: Start aggregation cycle @ Wed Dec 21 17:18:54 EST 2016, startTime = Wed Dec 21 17:13:51 EST 2016, endTime = Wed Dec 21 17:18:51 EST 2016

2016-12-21 17:18:55,828 INFO TimelineClusterAggregatorMinute: 1577 row(s) updated.

2016-12-21 17:18:55,829 INFO TimelineClusterAggregatorMinute: Aggregated cluster metrics for METRIC_AGGREGATE_MINUTE, with startTime = Wed Dec 21 17:13:51 EST 2016, endTime = Wed Dec 21 17:18:51 EST 2016

2016-12-21 17:18:55,829 INFO TimelineClusterAggregatorMinute: End aggregation cycle @ Wed Dec 21 17:18:55 EST 2016

2016-12-21 17:18:55,829 INFO TimelineClusterAggregatorMinute: End aggregation cycle @ Wed Dec 21 17:18:55 EST 2016

2016-12-21 17:18:56,262 INFO TimelineClusterAggregatorSecond: Last check point time: 1482358514752, lagBy: 221 seconds.

2016-12-21 17:18:56,262 INFO TimelineClusterAggregatorSecond: Start aggregation cycle @ Wed Dec 21 17:18:56 EST 2016, startTime = Wed Dec 21 17:15:14 EST 2016, endTime = Wed Dec 21 17:17:14 EST 2016

2016-12-21 17:18:56,361 INFO TimelineMetricHostAggregatorMinute: 5317 row(s) updated.

2016-12-21 17:18:56,361 INFO TimelineMetricHostAggregatorMinute: Aggregated host metrics for METRIC_RECORD_MINUTE, with startTime = Wed Dec 21 17:13:51 EST 2016, endTime = Wed Dec 21 17:18:51 EST 2016

2016-12-21 17:18:56,361 INFO TimelineMetricHostAggregatorMinute: End aggregation cycle @ Wed Dec 21 17:18:56 EST 2016

2016-12-21 17:18:56,361 INFO TimelineMetricHostAggregatorMinute: End aggregation cycle @ Wed Dec 21 17:18:56 EST 2016

2016-12-21 17:18:56,910 INFO TimelineClusterAggregatorSecond: Saving 9485 metric aggregates.

2016-12-21 17:18:58,111 INFO TimelineClusterAggregatorSecond: End aggregation cycle @ Wed Dec 21 17:18:58 EST 2016

2016-12-21 17:18:58,112 INFO TimelineClusterAggregatorSecond: End aggregation cycle @ Wed Dec 21 17:18:58 EST 2016

Highlighted

Re: Grafana Dashboard Init Failed when looking at some Ambari Metrics

Explorer

I found and fixed the issue. When ambari-metrics was installed originally it was ambari 2.2.1.0 ... I installed 2.2.2.0 and upgraded ambari, everywhere, but it looks as though the metrics collector was never upgraded.. I just upgraded it and restarted the service and I'm seeing the data now.