This section describes the following:
- Prerequisite Software
- Installation Methods
- Package Contents
- Manual Installation
- MSI Installation
- Installing Ambari SCOM Management Pack
Prerequisite Software
Setting up Ambari SCOM assumes the following prerequisite software:
- Apache Hadoop cluster (HDFS and MapReduce) 1.2.0 or later 1
- JDK 1.6
- Microsoft System Center Operations Manager (SCOM) 2012
- Microsoft SQL Server 2012
- Microsoft JDBC Driver 4.0 for SQL Server 2
1 Note: Ambari SCOM has been tested with a Hadoop cluster based on Hortonworks Data Platform 1.3 for Windows
2 Note: Obtain the Microsoft JDBC Driver 4.0 for SQL Server JAR file (sqljdbc4.jar
) at http://technet.microsoft.com/en-us/library/ms378749.aspx
Installation Methods
The following methods are available for installing Ambari SCOM:
- Manual Installation - This installation method requires you to configure the SQL Server database, setup the Ambari SCOM Server and configure the Hadoop Metrics Sink. This provides the most flexible install option based on your environment. See Manual Installation for more information.
- MSI Installation - This installation method installs the Ambari SCOM Server and configures the Hadoop Metrics Sink on all hosts in the cluster automatically using an MSI Installer. After launching the MSI, you provide information about your SQL Server database and the cluster for the installer to handle configuration. See MSI Installation for more information.
Package Contents
├─ ambari-scom-x.y.z
├── README.md
├── LICENSE
├── NOTICE
├── server.zip
├── metrics-sink.zip
├── ambari-scom.msi
└── mp.zip
File |
Name |
Description |
---|---|---|
|
Server Package |
Contains the required software for configuring the Ambari SCOM Server software. |
|
Metrics Sink Package |
Contains the required software for manually configuring SQL Server and the Hadoop Metrics Sink. |
|
MSI Installer |
The Ambari SCOM MSI Installer for configuring the Ambari SCOM Server and Hadoop Metrics Sink |
|
Management Pack Package |
Contains the Ambari SCOM Management Pack software. |
Manual Installation
Configuring SQL Server
- Configure an existing SQL Server instance for "mixed mode" authentication.
- Confirm SQL Server is installed with TCP/IP active and enabled. (default port: 1433)
- Create a user and password. Remember this user and password as this will be the account used by the Hadoop metrics interface for capturing metrics. (default user: sa)
- Extract the contents of the
metrics-sink.zip
package. - Create the Ambari SCOM database schema by running the
Hadoop-Metrics-SQLServer-CREATE.ddl
script.
The Hadoop Metrics DDL script will create a database called "HadoopMetrics". Edit the DDL before running if you would like to change the database name.
Configuring Hadoop Metrics Sink
Preparing the Metrics Sink
- Extract the contents of the
metrics-sink.zip
package to obtain themetrics-sink.jar
file. - Obtain the Microsoft JDBC Driver 4.0 for SQL Server
sqljdbc4.jar
file. - Copy
sqljdbc4.jar
andmetrics-sink.jar
to each host in the cluster.
Setup Hadoop Metrics2 Interface
- On each host in the cluster, setup the Hadoop metrics2 interface to use the
SQLServerSink
. - Edit the
hadoop-metrics2.properties
file:*.sink.sql.class=org.apache.hadoop.metrics2.sink.SqlServerSink namenode.sink.sql.databaseUrl=jdbc:sqlserver://[server]:[port];databaseName=[databaseName];user=[user];password=[password] datanode.sink.sql.databaseUrl=jdbc:sqlserver://[server]:[port];databaseName=[databaseName];user=[user];password=[password] jobtracker.sink.sql.databaseUrl=jdbc:sqlserver://[server]:[port];databaseName=[databaseName];user=[user];password=[password] tasktracker.sink.sql.databaseUrl=jdbc:sqlserver://[server]:[port];databaseName=[databaseName];user=[user];password=[password] maptask.sink.sql.databaseUrl=jdbc:sqlserver://[server]:[port];databaseName=[databaseName];user=[user];password=[password] reducetask.sink.sql.databaseUrl=jdbc:sqlserver://[server]:[port];databaseName=[databaseName];user=[user];password=[password]
In the above SQL statement:
server = SQL Server hostname
port = the SQL Server port (for example, 1433)
databaseName = the SQL Server database (for example, HadoopMetrics)
user = the SQL Server user (for example, sa)
password = the SQL Server password (for example, BigData1) - Update the Hadoop classpath for each service to include the metrics-sink and jdbc JAR files. The classpath is specified for each service in the
<arguments>
element of theservice.xml
file. For example:The... <arguments>... -classpath ...;C:\Ambari\metrics-sink-1.2.5.0.9.0.0-34.jar;C:\Ambari\sqljdbc4.jar ...</arguments> ...
service.xml
files will be located in thehadoopInstall\bin
folder of each host in the cluster.For example, to update the classpath for the
namenode
service edit thehadoopInstall\bin\namenode.xml
file. - Restart Hadoop for these changes to take affect.
Verify Metrics Collection
- Confirm metrics are being captured in the SQL Server database by querying the
MetricRecord
table:select * from HadoopMetrics.dbo.MetricRecord
In the above SQL statement,
HadoopMetrics
is the database name.
Installing and Configuring Ambari SCOM Server
Running the Server
- Extract the contents of the
server.zip
package to obtain the Ambari SCOM Server bits.
├── ambari-scom-server-version-conf.zip
├── ambari-scom-server-version-lib.zip
└── ambari-scom-server-version.jar - Extract the contents of the
ambari-scom-server-version-conf.zip
package to obtain the Ambari SCOM configuration files. - Edit the
ambari.properties
file:scom.sink.db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver scom.sink.db.url=jdbc:sqlserver://[server]:[port];databaseName=[databaseName];user=[user];password=[password]
In the above configuration:
server = SQL Server hostname
port = the SQL Server port (for example, 1433)
databaseName = the SQL Server database (for example, HadoopMetrics)
user = the SQL Server user (for example, sa)
password = the SQL Server password (for example, BigData1) - Extract the contents of the
ambari-scom-server-version-lib.zip
package to obtain the Ambari SCOM dependencies. - Run the
org.apache.ambari.scom.AmbariServer
class from the Java command line. Include the following in the classpath:
- configuration folder containing the Ambari SCOM configuration files.
- lib folder containing the Ambari SCOM dependencies.
- folder containing the
clusterproperties.txt
file from the hadoop install. - SQLServer JDBC jar (
sqljdbc4.jar
). ambari-scom-server-version.jar
file.
For example:java -server -XX:NewRatio=3 -XX:+UseConcMarkSweepGC -XX:-UseGCOverheadLimit -XX:CMSInitiatingOccupancyFraction=60 -Xms512m -Xmx2048m -cp "C:\ambari-scom\server\ambari-scom-server-1.2.5.0.9.0.0-34-conf;C:\ambari-scom\server\ambari-scom-server-1.2.5.0.9.0.0-34-lib;c:\HDP;c:\jdbc\sqljdbc4.jar;c:\ambari-scom\server\ambari-scom-server-1.2.5.0.9.0.0-34.jar" org.apache.ambari.scom.AmbariServer
Verify the Server API
- From a browser access the API
http://[server]:8080/api/v1/clusters
- Verify that metrics are being reported.
http://[server]:8080/api/v1/clusters/ambari/services/HDFS/components/NAMENODE
MSI Installation
Configuring SQL Server
- Configure an existing SQL Server instance for "mixed mode" authentication.
- Confirm SQL Server is installed with TCP/IP active and enabled. (default port: 1433)
- Create a user and password. (default user: sa)
Running the MSI Installer
- Extract the contents of the
server.zip
package to obtain the Ambari SCOM Server bits. - Run the
ambari-scom.msi
installer. The "Ambari SCOM Setup" dialog appears:
- Provide the following information:
Field
Description
Ambari SCOM package Directory
The directory where the installer will place the Ambari SCOM Server bits.
For example:c:\Ambari
SQL Server hostname
The hostname of the SQL Server instance for Ambari SCOM Server to use to store Hadoop metrics.
SQL Server port
The port of the SQL Server instance.
SQL Server login
The login username.
SQL Server password
The login password
Path to SQL Server JDBC Driver (sqljdbc4.jar)
The path to the JDBC Driver JAR file.
Path to the cluster layout file (clusterproperties.txt)
The path to the cluster layout properties file.
- You can optionally select to Start Services
- Click Install
- After completion, links are created on the desktop to "Start Ambari SCOM Server", "Browse Ambari API" and "Browse Ambari API Metrics". After starting the Ambari SCOM Server, browse the API and Metrics to confirm the server is working properly.
The MSI installer installation log can be found at C:\AmbariInstallFiles\AmbariSetupTools\ambari.winpkg.install.log
Installing Ambari SCOM Management Pack
Import the Management Pack
Perform the following to import the Ambari SCOM Management Pack into System Center Operations Manager.
- Extract the contents of the
mp.zip
package to obtain the Ambari SCOM management pack (.mpb
) files. - Ensure Windows Server 2012 running SCOM with SQL Server (full text search).
- Open System Center Operations Manager.
- Go to Administration -> Management Packs.
- From the Tasks panel, select Import Management Packs...
- In the Import Management Packs dialog, select Add -> Add from disk...
- You are prompted to search the Online Catalog. Click "No".
- Browse for the Ambari SCOM management pack files.
- Select the following files:
Ambari.SCOM.Monitoring.mpb Ambari.SCOM.Management.mpb Ambari.SCOM.Presentation.mpb
- Click "Open"
- Review the Import list and click "Install".
- The Ambari SCOM Management Pack installation will start.
Create Run As Account
Perform the following to configure a account to use when the Ambari SCOM Management Pack talks to the Ambari SCOM Server.
- After Importing the Management Pack is complete, go to Administration -> Run As Configuration -> Accounts.
- In the Tasks panel, select "Create Run as Account..."
- You are presented with the Create Run As Account Wizard.
- Go thru the wizard, select Run As account type "Basic Authentication".
- Give the account a Display name and click "Next".
- Enter the account name and password for the Ambari SCOM Server. This account will be used to connect to the Ambari SCOM Server to access the Ambari REST API. Default is account name is "admin" and password is "admin".
- Click "Next"
- Select the "Less secure" distribution security option.
- Click "Next" and complete the wizard.
Configure the Management Pack
Perform the following to configure the Ambari SCOM Management Pack to talk to the Ambari SCOM Server.
- Go to Authoring -> Management Pack Templates -> Ambari SCOM
- In the Tasks panel, select "Add Monitoring Wizard".
- Select monitoring type "Ambari SCOM"
- Provide a name and select the destination management pack (new or existing).
- Provide the Ambari URI with is the address of the Ambari SCOM Server in the format:
http://[server]:8080/api/
In the above Ambari URI,
server
is the Ambari SCOM Server. - Select the Run As Account that you created in Create Run As Account.
- Complete the Add Monitoring Wizard and proceed to the User Guide.