Return-Path: X-Original-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 442AB10853 for ; Fri, 18 Oct 2013 00:25:28 +0000 (UTC) Received: (qmail 33077 invoked by uid 500); 18 Oct 2013 00:25:26 -0000 Delivered-To: apmail-incubator-ambari-commits-archive@incubator.apache.org Received: (qmail 32975 invoked by uid 500); 18 Oct 2013 00:25:26 -0000 Mailing-List: contact ambari-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-commits@incubator.apache.org Received: (qmail 32325 invoked by uid 99); 18 Oct 2013 00:25:24 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Oct 2013 00:25:24 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CD2A8917BD2; Fri, 18 Oct 2013 00:25:24 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: mahadev@apache.org To: ambari-commits@incubator.apache.org Date: Fri, 18 Oct 2013 00:25:47 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [25/30] AMBARI-3266. Contribute Ambari-SCOM. (Tom Beerbower via mahadev) http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/AmbariSeedDiscoveryDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/AmbariSeedDiscoveryDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/AmbariSeedDiscoveryDataSource.mpx new file mode 100644 index 0000000..65d8bff --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/AmbariSeedDiscoveryDataSource.mpx @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + 14400 + $Config/SyncTime$ + + + + + + $Config/SeedClassId$ + + + + $MPElement[Name="System!System.Entity"]/DisplayName$ + Hadoop Ambari Service Seed ($Config/TemplateName$) + + + $MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$ + $Config/ComputerName$ + + + $MPElement[Name="Ambari.SCOM.AmbariSeed"]/TemplateName$ + $Config/TemplateName$ + + + $MPElement[Name="Ambari.SCOM.AmbariSeed"]/AmbariUri$ + $Config/AmbariUri$ + + + + + + + + + + + + + System!System.Discovery.Data + + + + + + + + + Hadoop Ambari Service Seed Discovery Data Provider + This module discovers Hadoop Ambari Service Seed. + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/ClusterServicesDiscoveryDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/ClusterServicesDiscoveryDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/ClusterServicesDiscoveryDataSource.mpx new file mode 100644 index 0000000..48a4146 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/ClusterServicesDiscoveryDataSource.mpx @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/TimeoutSeconds$ + ClusterServicesDiscovery + + + + TemplateName + $Config/TemplateName$ + + + ClusterName + $Config/ClusterName$ + + + ClusterAmbariUri + $Config/ClusterAmbariUri$ + + + WatcherNodesList + $Config/WatcherNodesList$ + + + Username + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/UserName$ + + + Password + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/Password$ + + + + + + + + + + System!System.Discovery.Data + + + + + + + + + Hadoop Cluster Services Discovery Data Provider + This module discovers Hadoop Cluster Services of specific Hadoop Cluster. + + + Interval (sec) + + + Sync Time + + + Timeout (sec) + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/ClustersDiscoveryDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/ClustersDiscoveryDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/ClustersDiscoveryDataSource.mpx new file mode 100644 index 0000000..93aee67 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/ClustersDiscoveryDataSource.mpx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/TimeoutSeconds$ + ClustersDiscovery + + + + TemplateName + $Config/TemplateName$ + + + SeedComputerName + $Config/SeedComputerName$ + + + ClusterSeedClassId + $Config/ClusterSeedClassId$ + + + AmbariUri + $Config/AmbariUri$ + + + ClustersQueryUriSegment + $Config/ClustersQueryUriSegment$ + + + WatcherNodesList + $Config/WatcherNodesList$ + + + Username + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/UserName$ + + + Password + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/Password$ + + + + + + + + + + System!System.Discovery.Data + + + + + + + + + Hadoop Clusters Discovery Data Provider + This module discovers Hadoop Clusters managed by specified Hadoop Ambari Service. + + + Interval (sec) + + + Sync Time + + + Timeout (sec) + + + Clusters Query URI Segment + URI segment to query list of clusters managed by Ambari instance. + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/HostComponentsDiscoveryDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/HostComponentsDiscoveryDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/HostComponentsDiscoveryDataSource.mpx new file mode 100644 index 0000000..1175f84 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/HostComponentsDiscoveryDataSource.mpx @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/TimeoutSeconds$ + HostComponentsDiscovery + + + + TemplateName + $Config/TemplateName$ + + + ClusterName + $Config/ClusterName$ + + + HostName + $Config/HostName$ + + + HostIpAddress + $Config/HostIpAddress$ + + + HostAmbariUri + $Config/HostAmbariUri$ + + + Username + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/UserName$ + + + Password + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/Password$ + + + + + + + + + + System!System.Discovery.Data + + + + + + + + + Hadoop Host Components Discovery Data Provider + This module discovers Hadoop Host Components. + + + Interval (sec) + + + Sync Time + + + Timeout (sec) + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/HostsDiscoveryDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/HostsDiscoveryDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/HostsDiscoveryDataSource.mpx new file mode 100644 index 0000000..7d0bc12 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/HostsDiscoveryDataSource.mpx @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/TimeoutSeconds$ + HostsDiscovery + + + + TemplateName + $Config/TemplateName$ + + + ClusterName + $Config/ClusterName$ + + + ClusterAmbariUri + $Config/ClusterAmbariUri$ + + + WatcherNodesList + $Config/WatcherNodesList$ + + + Username + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/UserName$ + + + Password + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/Password$ + + + + + + + + + + System!System.Discovery.Data + + + + + + + + + Hadoop Hosts Discovery Data Provider + This module discovers Hadoop Hosts of specific Hadoop Cluster. + + + Interval (sec) + + + Sync Time + + + Timeout (sec) + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/PowerShellDiscoveryDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/PowerShellDiscoveryDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/PowerShellDiscoveryDataSource.mpx new file mode 100644 index 0000000..66284da --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/PowerShellDiscoveryDataSource.mpx @@ -0,0 +1,85 @@ + + + + + + + + Windows!Microsoft.Windows.PowerShellSchema + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/WorkflowName$.ps1 + + $Config/Script$ + $IncludeFileContent/Shared Scripts/Logging.ps1$ + $IncludeFileContent/Shared Scripts/JsonParser.ps1$ + $IncludeFileContent/Shared Scripts/RestApi.ps1$ + $IncludeFileContent/Shared Scripts/HealthServicesManagement.ps1$ + $IncludeFileContent/Shared Scripts/DiscoveryHelpers.ps1$ + + $ScriptApi = New-Object -ComObject "MOM.ScriptAPI" + + try { + if (!$Username) { + CreateEmptyDiscoveryData + return + } + Main + } catch { + LogMessage '$Config/WorkflowName$' 1 $_ + CreateEmptyDiscoveryData + } + + $Config/Parameters$ + $Config/TimeoutSeconds$ + + + + + + + + System!System.Discovery.Data + + + + + + + + + Hadoop PowerShell Script Discovery Data Provider + This module executes PowerShell scripts to discover different Hadoop entities. + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/ClusterServicesDiscovery.ps1 ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/ClusterServicesDiscovery.ps1 b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/ClusterServicesDiscovery.ps1 new file mode 100644 index 0000000..cda6b14 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/ClusterServicesDiscovery.ps1 @@ -0,0 +1,80 @@ +## Licensed to the Apache Software Foundation (ASF) under one +## or more contributor license agreements. See the NOTICE file +## distributed with this work for additional information +## regarding copyright ownership. The ASF licenses this file +## to you under the Apache License, Version 2.0 (the +## "License"); you may not use this file except in compliance +## with the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, +## software distributed under the License is distributed on an +## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +## KIND, either express or implied. See the License for the +## specific language governing permissions and limitations +## under the License. + +Param ($TemplateName, $ClusterName, $ClusterAmbariUri, $WatcherNodesList = "", $Username, $Password) + +function DiscoverServices($discoveryData, $healthServices) { + $parent = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.ClusterSoftwareProjection"]$") + $parent.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/TemplateName$", $TemplateName) + $parent.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/ClusterName$", $ClusterName) + + $clusterServices = InvokeRestAPI (JoinUri "$ClusterAmbariUri" "services") $Username $Password + + foreach ($clusterService in $clusterServices.items) { + $serviceClassId = GetServiceClassId $clusterService.ServiceInfo.service_name + if ($serviceClassId -eq $null) { continue } + + $serviceName = FormatClusterServiceName $clusterService.ServiceInfo.service_name + + $servicePrivateEntity = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.ClusterService.Private"]$") + $servicePrivateEntity.AddProperty("$MPElement[Name='Ambari.SCOM.AmbariManagedEntity']/AmbariUri$", $clusterService.href) + $servicePrivateEntity.AddProperty("$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/TemplateName$", $TemplateName) + $servicePrivateEntity.AddProperty("$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/ClusterName$", $ClusterName) + $servicePrivateEntity.AddProperty("$MPElement[Name='Ambari.SCOM.ClusterService.Private']/ServiceName$", $clusterService.ServiceInfo.service_name) + $servicePrivateEntity.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", (GetPrivateEntityDisplayName $serviceName)) + $discoveryData.AddInstance($servicePrivateEntity) + + AddManagementRelationship $discoveryData $healthServices (MergeStrings $ClusterName $clusterService.name) $servicePrivateEntity + + $serviceEntity = $discoveryData.CreateClassInstance($serviceClassId) + $serviceEntity.AddProperty("$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/TemplateName$", $TemplateName) + $serviceEntity.AddProperty("$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/ClusterName$", $ClusterName) + $serviceEntity.AddProperty("$MPElement[Name='Ambari.SCOM.ClusterService.Private']/ServiceName$", $clusterService.ServiceInfo.service_name) + $serviceEntity.AddProperty("$MPElement[Name="Ambari.SCOM.ClusterService"]/ClusterName$", $ClusterName) + $serviceEntity.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", $serviceName) + $discoveryData.AddInstance($serviceEntity) + + $parentRelationship = $discoveryData.CreateRelationshipInstance("$MPElement[Name="Ambari.SCOM.ClusterSoftwareProjectionContainsClusterService"]$") + $parentRelationship.Source = $parent + $parentRelationship.Target = $serviceEntity + $discoveryData.AddInstance($parentRelationship) + } +} + +function GetServiceClassId($monitoringUri) { + switch ($monitoringUri -replace ".*/", "") { + 'hdfs' { '$MPElement[Name="Ambari.SCOM.ClusterService.Hdfs"]$' } + 'mapreduce' { '$MPElement[Name="Ambari.SCOM.ClusterService.MapReduce"]$' } + 'hive' { '$MPElement[Name="Ambari.SCOM.ClusterService.Hive"]$' } + { 'templeton', 'webhcat' -contains $_ } { '$MPElement[Name="Ambari.SCOM.ClusterService.Templeton"]$' } + 'oozie' { '$MPElement[Name="Ambari.SCOM.ClusterService.Oozie"]$' } + 'pig' { '$MPElement[Name="Ambari.SCOM.ClusterService.Pig"]$' } + 'sqoop' { '$MPElement[Name="Ambari.SCOM.ClusterService.Sqoop"]$' } + default: { $null } + } +} + +function Main() { + $discoveryData = $ScriptApi.CreateDiscoveryData(0, "$MPElement$", "$Target/Id$") + + $healthServices = CreateHealthServicesFromWatcherNodesList $discoveryData $WatcherNodesList + if ($healthServices.Count -eq 0) { return $discoveryData } + + DiscoverServices $discoveryData $healthServices + + $discoveryData +} http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/ClustersDiscovery.ps1 ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/ClustersDiscovery.ps1 b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/ClustersDiscovery.ps1 new file mode 100644 index 0000000..d0e9de2 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/ClustersDiscovery.ps1 @@ -0,0 +1,92 @@ +## Licensed to the Apache Software Foundation (ASF) under one +## or more contributor license agreements. See the NOTICE file +## distributed with this work for additional information +## regarding copyright ownership. The ASF licenses this file +## to you under the Apache License, Version 2.0 (the +## "License"); you may not use this file except in compliance +## with the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, +## software distributed under the License is distributed on an +## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +## KIND, either express or implied. See the License for the +## specific language governing permissions and limitations +## under the License. + +Param ($TemplateName, $SeedComputerName, $ClusterSeedClassId, $AmbariUri, $ClustersQueryUriSegment, $WatcherNodesList = "", $Username, $Password) + +function CreateClusterEntity($discoveryData, $cluster, $healthServices) { + $clusterName = $cluster.Clusters.cluster_name + + $clusterSeedEntity = $discoveryData.CreateClassInstance("$ClusterSeedClassId") + $clusterSeedEntity.AddProperty("$MPElement[Name='Ambari.SCOM.AmbariManagedEntity']/AmbariUri$", $cluster.href) + $clusterSeedEntity.AddProperty("$MPElement[Name="Ambari.SCOM.ClusterSeed"]/TemplateName$", $TemplateName) + $clusterSeedEntity.AddProperty("$MPElement[Name="Ambari.SCOM.ClusterSeed"]/ClusterName$", $clusterName) + $clusterSeedEntity.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Hadoop Cluster Seed ($clusterName)") + $discoveryData.AddInstance($clusterSeedEntity) + + AddManagementRelationship $discoveryData $healthServices $cluster.name $clusterSeedEntity + + $clusterPrivateEntity = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.Cluster.Private"]$") + $clusterPrivateEntity.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/TemplateName$", $TemplateName) + $clusterPrivateEntity.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/ClusterName$", $clusterName) + $clusterPrivateEntity.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", (GetPrivateEntityDisplayName $clusterName)) + $discoveryData.AddInstance($clusterPrivateEntity) + + $clusterEntity = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.Cluster"]$") + $clusterEntity.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/TemplateName$", $TemplateName) + $clusterEntity.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/ClusterName$", $clusterName) + $clusterEntity.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", $clusterName) + $discoveryData.AddInstance($clusterEntity) + + $nodesGroup = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.ClusterHardwareProjection"]$") + $nodesGroup.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/TemplateName$", $TemplateName) + $nodesGroup.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/ClusterName$", $clusterName) + $nodesGroup.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Hosts") + $discoveryData.AddInstance($nodesGroup) + + $servicesGroup = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.ClusterSoftwareProjection"]$") + $servicesGroup.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/TemplateName$", $TemplateName) + $servicesGroup.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/ClusterName$", $clusterName) + $servicesGroup.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Services") + $discoveryData.AddInstance($servicesGroup) + + $clusterEntity +} + +function DiscoverClusters($discoveryData, $healthServices) { + $parent = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.AmbariSeed"]$") + $parent.AddProperty("$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$", $SeedComputerName) + $parent.AddProperty("$MPElement[Name="Ambari.SCOM.AmbariSeed"]/TemplateName$", $TemplateName) + + $clustersResult = InvokeRestAPI (JoinUri "$AmbariUri" "$ClustersQueryUriSegment") $Username $Password + foreach ($cluster in $clustersResult.items) { + $clusterEntity = CreateClusterEntity $discoveryData $cluster $healthServices + + $parentRelationship = $discoveryData.CreateRelationshipInstance("$MPElement[Name="Ambari.SCOM.AmbariSeedContainsCluster"]$") + $parentRelationship.Source = $parent + $parentRelationship.Target = $clusterEntity + $discoveryData.AddInstance($parentRelationship) + } +} + +function Main() { + $discoveryData = $ScriptApi.CreateDiscoveryData(0, "$MPElement$", "$Target/Id$") + + $healthServices = @() + foreach ($watcherNodeName in $WatcherNodesList.Split(';', [StringSplitOptions]::RemoveEmptyEntries)) { + $healthServices += CreateHealthService $discoveryData $watcherNodeName + + $watcherNodeEntity = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.AmbariWatcherNode"]$") + $watcherNodeEntity.AddProperty("$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$", $watcherNodeName) + $watcherNodeEntity.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", "Hadoop Watcher Node") + $discoveryData.AddInstance($watcherNodeEntity) + } + if ($healthServices.Count -eq 0) { return $discoveryData } + + DiscoverClusters $discoveryData $healthServices + + $discoveryData +} http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/HostComponentsDiscovery.ps1 ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/HostComponentsDiscovery.ps1 b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/HostComponentsDiscovery.ps1 new file mode 100644 index 0000000..f2c29ce --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/HostComponentsDiscovery.ps1 @@ -0,0 +1,134 @@ +## Licensed to the Apache Software Foundation (ASF) under one +## or more contributor license agreements. See the NOTICE file +## distributed with this work for additional information +## regarding copyright ownership. The ASF licenses this file +## to you under the Apache License, Version 2.0 (the +## "License"); you may not use this file except in compliance +## with the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, +## software distributed under the License is distributed on an +## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +## KIND, either express or implied. See the License for the +## specific language governing permissions and limitations +## under the License. + +Param ($TemplateName, $ClusterName, $HostName, $HostIpAddress, $HostAmbariUri, $Username, $PAssword) + +function Main() { + $discoveryData = $ScriptApi.CreateDiscoveryData(0, '$MPElement$', '$Target/Id$') + + $componentsResult = InvokeRestAPI (JoinUri "$HostAmbariUri" 'host_components') $Username $Password + + $baseMonitoringUri = $HostAmbariUri -replace '(?i)/hosts/.*', '' + $parentServices = @{} + + foreach ($component in $componentsResult.items) { + $componentClassId = GetComponentClassId $component.HostRoles.component_name + if ($componentClassId -eq $null) { continue } + + $componentName = $component.HostRoles.component_name + + $componentEntity = $discoveryData.CreateClassInstance($componentClassId) + $componentEntity.AddProperty('$MPElement[Name="Ambari.SCOM.Host.Private"]/TemplateName$', $TemplateName) + $componentEntity.AddProperty('$MPElement[Name="Ambari.SCOM.Host.Private"]/ClusterName$', $ClusterName) + $componentEntity.AddProperty('$MPElement[Name="Ambari.SCOM.Host.Private"]/HostName$', $HostName) + $componentEntity.AddProperty('$MPElement[Name="Ambari.SCOM.Host"]/IpAddress$', $HostIpAddress) + $componentEntity.AddProperty('$MPElement[Name="Ambari.SCOM.AmbariManagedEntity"]/AmbariUri$', $component.href) + $componentEntity.AddProperty('$MPElement[Name="Ambari.SCOM.HostComponent"]/ClusterName$', $ClusterName) + $componentEntity.AddProperty('$MPElement[Name="Ambari.SCOM.HostComponent"]/ComponentName$', $componentName) + $componentEntity.AddProperty('$MPElement[Name="System!System.Entity"]/DisplayName$', (FormatHostComponentName $componentName)) + $discoveryData.AddInstance($componentEntity) + + $parentServiceName = GetParentServiceName $componentName + + if (!$parentServiceName) { continue } + + if (!$parentServices.ContainsKey($parentServiceName)) { + $parentServices[$parentServiceName] = CreateParentService $discoveryData $parentServiceName + } + + $parentServiceRelationship = $discoveryData.CreateRelationshipInstance((GetParentServiceRelationshipId $componentName)) + $parentServiceRelationship.Source = $parentServices[$parentServiceName] + $parentServiceRelationship.Target = $componentEntity + $discoveryData.AddInstance($parentServiceRelationship) + } + + $discoveryData +} + +function GetComponentClassId($componentName) { + switch ($componentName) { + 'namenode' { '$MPElement[Name="Ambari.SCOM.HostComponent.NameNode"]$' } + 'secondary_namenode' { '$MPElement[Name="Ambari.SCOM.HostComponent.SecondaryNameNode"]$' } + 'jobtracker' { '$MPElement[Name="Ambari.SCOM.HostComponent.JobTracker"]$' } + 'tasktracker' { '$MPElement[Name="Ambari.SCOM.HostComponent.TaskTracker"]$' } + 'hive_server' { '$MPElement[Name="Ambari.SCOM.HostComponent.HiveServer"]$' } + 'hive_metastore' { '$MPElement[Name="Ambari.SCOM.HostComponent.HiveMetastore"]$' } + 'hive_client' { '$MPElement[Name="Ambari.SCOM.HostComponent.HiveClient"]$' } + { 'templeton', 'webhcat_server' -contains $_ } { '$MPElement[Name="Ambari.SCOM.HostComponent.TempletonServer"]$' } + 'oozie_server' { '$MPElement[Name="Ambari.SCOM.HostComponent.OozieServer"]$' } + 'pig' { '$MPElement[Name="Ambari.SCOM.HostComponent.Pig"]$' } + 'sqoop' { '$MPElement[Name="Ambari.SCOM.HostComponent.Sqoop"]$' } + default { $null } + } +} + +function GetParentServiceName($componentName) { + switch ($componentName) { + { 'namenode', 'secondary_namenode', 'datanode' -contains $_ } { 'HDFS' } + { 'jobtracker', 'tasktracker' -contains $_ } { 'MAPREDUCE' } + { 'hive_server', 'hive_metastore', 'hive_client' -contains $_ } { 'HIVE' } + 'templeton' { 'TEMPLETON' } + 'webhcat_server' { 'WEBHCAT' } + 'oozie_server' { 'OOZIE' } + 'pig' { 'PIG' } + 'sqoop' { 'SQOOP' } + default { $null } + } +} + +function CreateParentService($discoveryData, $serviceName) { + $serviceClassId = switch ($serviceName) { + 'hdfs' { '$MPElement[Name="Ambari.SCOM.ClusterService.Hdfs"]$' } + 'mapreduce' { '$MPElement[Name="Ambari.SCOM.ClusterService.MapReduce"]$' } + 'hive' { '$MPElement[Name="Ambari.SCOM.ClusterService.Hive"]$' } + { 'templeton', 'webhcat' -contains $_ } { '$MPElement[Name="Ambari.SCOM.ClusterService.Templeton"]$' } + 'oozie' { '$MPElement[Name="Ambari.SCOM.ClusterService.Oozie"]$' } + 'pig' { '$MPElement[Name="Ambari.SCOM.ClusterService.Pig"]$' } + 'sqoop' { '$MPElement[Name="Ambari.SCOM.ClusterService.Sqoop"]$' } + } + + $serviceDisplayName = FormatClusterServiceName $serviceName + + $privateEntity = $discoveryData.CreateClassInstance('$MPElement[Name="Ambari.SCOM.ClusterService.Private"]$') + $privateEntity.AddProperty('$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/TemplateName$', $TemplateName) + $privateEntity.AddProperty('$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/ClusterName$', $ClusterName) + $privateEntity.AddProperty('$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/ServiceName$', $serviceName) + $privateEntity.AddProperty('$MPElement[Name="System!System.Entity"]/DisplayName$', (GetPrivateEntityDisplayName $serviceDisplayName)) + $discoveryData.AddInstance($privateEntity) + + $entity = $discoveryData.CreateClassInstance("$serviceClassId") + $entity.AddProperty('$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/TemplateName$', $TemplateName) + $entity.AddProperty('$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/ClusterName$', $ClusterName) + $entity.AddProperty('$MPElement[Name="Ambari.SCOM.ClusterService.Private"]/ServiceName$', $serviceName) + $entity.AddProperty('$MPElement[Name="System!System.Entity"]/DisplayName$', $serviceDisplayName) + $discoveryData.AddInstance($entity) + + $entity +} + +function GetParentServiceRelationshipId($componentName) { + switch ($componentName) { + 'namenode' { '$MPElement[Name="Ambari.SCOM.HdfsServiceContainsNameNodeComponent"]$' } + 'secondary_namenode' { '$MPElement[Name="Ambari.SCOM.HdfsServiceContainsSecondaryNameNodeComponent"]$' } + 'jobtracker' { '$MPElement[Name="Ambari.SCOM.MapReduceServiceContainsJobTrackerComponent"]$' } + 'hive_server' { '$MPElement[Name="Ambari.SCOM.HiveServiceContainsHiveServerComponent"]$' } + 'hive_metastore' { '$MPElement[Name="Ambari.SCOM.HiveServiceContainsHiveMetastoreComponent"]$' } + {'templeton', 'webhcat_server' -contains $_ } { '$MPElement[Name="Ambari.SCOM.TempletonServiceContainsTempletonServerComponent"]$' } + 'oozie_server' { '$MPElement[Name="Ambari.SCOM.OozieServiceContainsOozieServerComponent"]$' } + default { '$MPElement[Name="Ambari.SCOM.ClusterServiceContainsHostComponent"]$' } + } +} http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/HostsDiscovery.ps1 ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/HostsDiscovery.ps1 b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/HostsDiscovery.ps1 new file mode 100644 index 0000000..6307980 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Discovery/Scripts/HostsDiscovery.ps1 @@ -0,0 +1,64 @@ +## Licensed to the Apache Software Foundation (ASF) under one +## or more contributor license agreements. See the NOTICE file +## distributed with this work for additional information +## regarding copyright ownership. The ASF licenses this file +## to you under the Apache License, Version 2.0 (the +## "License"); you may not use this file except in compliance +## with the License. You may obtain a copy of the License at +## +## http://www.apache.org/licenses/LICENSE-2.0 +## +## Unless required by applicable law or agreed to in writing, +## software distributed under the License is distributed on an +## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +## KIND, either express or implied. See the License for the +## specific language governing permissions and limitations +## under the License. + +Param ($TemplateName, $ClusterName, $ClusterAmbariUri, $WatcherNodesList = "", $Username, $Password) + +function DiscoverHosts($discoveryData, $healthServices) { + $parent = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.ClusterHardwareProjection"]$") + $parent.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/TemplateName$", $TemplateName) + $parent.AddProperty("$MPElement[Name="Ambari.SCOM.Cluster.Private"]/ClusterName$", $ClusterName) + + $nodesResult = InvokeRestAPI (JoinUri "$ClusterAmbariUri" "hosts") $Username $Password + foreach ($node in $nodesResult.items) { + # TODO: Get IP addresses with single request? + $nodeResult = InvokeRestAPI $node.href $Username $Password + + $nodePrivateEntity = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.Host.Private"]$") + $nodePrivateEntity.AddProperty("$MPElement[Name='Ambari.SCOM.AmbariManagedEntity']/AmbariUri$", $node.href) + $nodePrivateEntity.AddProperty("$MPElement[Name="Ambari.SCOM.Host.Private"]/TemplateName$", $TemplateName) + $nodePrivateEntity.AddProperty("$MPElement[Name="Ambari.SCOM.Host.Private"]/ClusterName$", $ClusterName) + $nodePrivateEntity.AddProperty("$MPElement[Name='Ambari.SCOM.Host.Private']/HostName$", $node.Hosts.host_name) + $nodePrivateEntity.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", (GetPrivateEntityDisplayName $node.Hosts.host_name)) + $discoveryData.AddInstance($nodePrivateEntity) + + AddManagementRelationship $discoveryData $healthServices (MergeStrings $ClusterName $node.Hosts.host_name) $nodePrivateEntity + + $nodeEntity = $discoveryData.CreateClassInstance("$MPElement[Name="Ambari.SCOM.Host"]$") + $nodeEntity.AddProperty("$MPElement[Name="Ambari.SCOM.Host.Private"]/TemplateName$", $TemplateName) + $nodeEntity.AddProperty("$MPElement[Name="Ambari.SCOM.Host.Private"]/ClusterName$", $ClusterName) + $nodeEntity.AddProperty("$MPElement[Name='Ambari.SCOM.Host.Private']/HostName$", $node.Hosts.host_name) + $nodeEntity.AddProperty("$MPElement[Name='Ambari.SCOM.Host']/IpAddress$", $nodeResult.Hosts.ip) + $nodeEntity.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", $node.Hosts.host_name) + $discoveryData.AddInstance($nodeEntity) + + $parentRelationship = $discoveryData.CreateRelationshipInstance("$MPElement[Name="Ambari.SCOM.ClusterHardwareProjectionContainsHost"]$") + $parentRelationship.Source = $parent + $parentRelationship.Target = $nodeEntity + $discoveryData.AddInstance($parentRelationship) + } +} + +function Main() { + $discoveryData = $ScriptApi.CreateDiscoveryData(0, "$MPElement$", "$Target/Id$") + + $healthServices = CreateHealthServicesFromWatcherNodesList $discoveryData $WatcherNodesList + if ($healthServices.Count -eq 0) { return $discoveryData } + + DiscoverHosts $discoveryData $healthServices + + $discoveryData +} http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/BaseScriptedPropertyBagDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/BaseScriptedPropertyBagDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/BaseScriptedPropertyBagDataSource.mpx new file mode 100644 index 0000000..986104b --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/BaseScriptedPropertyBagDataSource.mpx @@ -0,0 +1,94 @@ + + + + + + + + + Windows!Microsoft.Windows.PowerShellSchema + System!System.ExpressionEvaluatorSchema + + + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + + + $Config/WorkflowName$.ps1 + + $Config/Script$ + + $IncludeFileContent/Shared Scripts/Logging.ps1$ + $IncludeFileContent/Shared Scripts/JsonParser.ps1$ + $IncludeFileContent/Shared Scripts/RestApi.ps1$ + $IncludeFileContent/Shared Scripts/MonitoringHelpers.ps1$ + + if (!$Username) { return } + + $ScriptApi = New-Object -ComObject "MOM.ScriptAPI" + try { + Main + } catch { + LogMessage '$Config/WorkflowName$' 1 $_ + } + + $Config/Parameters$ + $Config/TimeoutSeconds$ + + + $Config/StartupExpression$ + + + + + + + + + + + + System!System.PropertyBagData + + + + + + + + + Hadoop Base Scripted Property Bag Data Provider + This module allows to execute Powershell scripts to collect data into Property Bag objects. + + + + + http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/ClusterServiceMetricsDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/ClusterServiceMetricsDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/ClusterServiceMetricsDataSource.mpx new file mode 100644 index 0000000..b81f457 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/ClusterServiceMetricsDataSource.mpx @@ -0,0 +1,102 @@ + + + + + + + + + Windows!Microsoft.Windows.PowerShellSchema + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/TimeoutSeconds$ + + + + + + + $Target/Host/Property[Type="Ambari.SCOM.AmbariManagedEntity"]/AmbariUri$ + + + + + + + $Target/Host/Property[Type="Ambari.SCOM.AmbariManagedEntity"]/AmbariUri$ + + NotEqual + + + + + + + + + $Config/ServiceName$ServiceMetricsCollection + + + + MonitoringAmbariUri + $Target/Host/Property[Type="Ambari.SCOM.AmbariManagedEntity"]/AmbariUri$ + + + Username + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/UserName$ + + + Password + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/Password$ + + + + + + + + + + System!System.PropertyBagData + + + + + + + + + Hadoop Base Cluster Service Metrics Property Bag Data Provider + This module collects all metrics available for target Cluster Service into property bag using provided collection script. + + + + + http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HdfsServiceMetricsDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HdfsServiceMetricsDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HdfsServiceMetricsDataSource.mpx new file mode 100644 index 0000000..ac7aaf3 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HdfsServiceMetricsDataSource.mpx @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/TimeoutSeconds$ + $IncludeFileContent/Modules/DataSources/Monitoring/Scripts/HdfsServiceMetrics.ps1$ + Hdfs + + + + + + + + System!System.PropertyBagData + + + + + + + + + Hadoop HDFS Cluster Service Metrics Property Bag Data Provider + This module collects all metrics available for target HDFS Cluster Service into property bag. + + + Interval (sec) + + + Sync Time + + + Timeout (sec) + + + + + http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HdfsServiceMetricsPerformanceDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HdfsServiceMetricsPerformanceDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HdfsServiceMetricsPerformanceDataSource.mpx new file mode 100644 index 0000000..f3345fe --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HdfsServiceMetricsPerformanceDataSource.mpx @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/TimeoutSeconds$ + + + $Config/PropertyName$ + Hadoop : Cluster Service + $Config/CounterName$ + $Target/Host/Property[Type="Ambari.SCOM.ClusterService.Private"]/ClusterName$ : $Target/Host/Property[Type="Ambari.SCOM.ClusterService.Private"]/ServiceName$ + + + + + + + + + + Perf!System.Performance.Data + + + + + + + + + Hadoop HDFS Cluster Service Metrics Performance Data Provider + This module collects specified metric for HDFS Cluster Service as performance data point. + + + Interval (sec) + + + Sync Time + + + Timeout (sec) + + + + + http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HostComponentHealthStateDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HostComponentHealthStateDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HostComponentHealthStateDataSource.mpx new file mode 100644 index 0000000..9b86429 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HostComponentHealthStateDataSource.mpx @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/TimeoutSeconds$ + HostComponentHealthState + + + + MonitoringAmbariUri + $Config/MonitoringAmbariUri$ + + + Username + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/UserName$ + + + Password + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/Password$ + + + + + + + + + + System!System.PropertyBagData + + + + + + + + + Hadoop Host Component Health State Data Provider + This module providers health state for target Host Component. + + + Interval (sec) + + + Sync Time + + + Timeout (sec) + + + + + http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/873b3502/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HostComponentMetricsDataSource.mpx ---------------------------------------------------------------------- diff --git a/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HostComponentMetricsDataSource.mpx b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HostComponentMetricsDataSource.mpx new file mode 100644 index 0000000..b5911b8 --- /dev/null +++ b/contrib/ambari-scom/management-pack/Hadoop_MP/HadoopMp/Modules/DataSources/Monitoring/HostComponentMetricsDataSource.mpx @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + $Config/IntervalSeconds$ + $Config/SyncTime$ + $Config/TimeoutSeconds$ + HostComponentMetricsCollection + + + + MonitoringAmbariUri + $Target/Property[Type="Ambari.SCOM.AmbariManagedEntity"]/AmbariUri$ + + + Username + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/UserName$ + + + Password + $RunAs[Name="Ambari.SCOM.Profile.Ambari"]/Password$ + + + + + + + + + + System!System.PropertyBagData + + + + + + + + + Hadoop Host Component Metrics Data Provider + This module collects all metrics available for target Host Component into property bag. + + + Interval (sec) + + + Sync Time + + + Timeout (sec) + + + + +