On Ambari 2.6.x and 2.7.x if the Ambari Metrics Collector whitelisting is enabled, the Kafka Topics are not discovered on the Kafka topics dashboard. (The Topics dropdown is empty.)
It can be remediated by adding '._p_kafka.log.Log.*' to the whitelist file and restarting the Metrics Collector.
Adding the '._p_kafka.log.Log.*' to the whitelist file by default should be considered. Also it should be investigated why we need the ".p" prefix.
Furthermore, it seems that the metrics enabled in the whitelist file as:
are filtered out and not shown on Grafana dashboard.
The issue can be worked around by adding the '.p' prefix to the corresponding metrics in the whitelist file, e.g.