Use following script actions in HDInsight cluster to install OMS integration for following components. Script action needs two parameters from your OMS Log Analytics Workspace:
workspaceid, worspacekey
Select Head Node, Worker Node & Zookeeper Nodes
https://raw.githubusercontent.com/hdinsight/HDInsightOMS/master/monitoring/script2.shSelect Head Node, Worker Nodes
https://raw.githubusercontent.com/hdinsight/HDInsightOMS/master/monitoring/scriptspark.shSelect Head Node, Worker Nodes
https://raw.githubusercontent.com/hdinsight/HDInsightOMS/master/monitoring/installintractivehive.shSelect Head Node, Worker Nodes
https://raw.githubusercontent.com/hdinsight/HDInsightOMS/master/monitoring/hivescript.shOnce installed, you can check HDInsight Logs and Metrics data in Azure Log Analytics.
You can also import pre-built Import Views in Log Analytics (OMS) View
https://raw.githubusercontent.com/hdinsight/HDInsightOMS/master/monitoring/sparkOMS.omsviewhttps://raw.githubusercontent.com/hdinsight/HDInsightOMS/master/monitoring/hiveviewoms.omsviewQueries to try
(Type=metrics_resourcemanager_clustermetrics_CL)| measure max(NumActiveNMs_d) by ClusterName_s interval 10minute(Type=metrics_resourcemanager_queue_root_default_CL) |measure max(AppsPending_d) as AppsPending by ClusterName_s interval 1HOUR* (Type=log_sparkappsexecutors_CL) |select Message