blob: 210dddeeb41b07214c4df6d901a065d3ae33ba1b [file] [log] [blame]
~~ 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
~~ Unless required by applicable law or agreed to in writing, software
~~ distributed under the License is distributed on an "AS IS" BASIS,
~~ See the License for the specific language governing permissions and
~~ limitations under the License.
Chukwa Quick Start Guide
Chukwa is a system for large-scale reliable log collection and processing with Hadoop. The Chukwa design overview discusses the overall architecture of Chukwa. You should read that document before this one. The purpose of this document is to help you install and configure Chukwa.
Chukwa should work on any POSIX platform, but GNU/Linux is the only production platform that has been tested extensively. Chukwa has also been used successfully on Mac OS X, which several members of the Chukwa team use for development.
Software requirements are Java 1.6 or better, ZooKeeper {{${zookeeperVersion}}}, HBase {{${hbaseVersion}}} and Hadoop {{${hadoopVersion}}}.
The Chukwa cluster management scripts rely on ssh; these scripts, however, are not required if you have some alternate mechanism for starting and stopping daemons.
Installing Chukwa
A minimal Chukwa deployment has five components:
* A Hadoop and HBase cluster on which Chukwa will process data (referred to as the Chukwa cluster).
* One or more agent processes, that send monitoring data to HBase. The nodes with active agent processes are referred to as the monitored source nodes.
* Solr Cloud cluster which Chukwa will store indexed log files.
* Data analytics script, summarize Hadoop Cluster Health.
* HICC, the Chukwa visualization tool.
[./images/chukwa_architecture.png] Chukwa ${VERSION} Architecture
First Steps
* Obtain a copy of Chukwa. You can find the latest release on the Chukwa {{{}release page}} (or alternatively check the source code out from SCM).
* Un-tar the release, via tar xzf.
* Make sure a copy of Chukwa is available on each node being monitored.
* We refer to the directory containing Chukwa as CHUKWA_HOME. It may be useful to set CHUKWA_HOME explicitly in your environment for ease of use.
Setting Up Chukwa Cluster
* Configure Hadoop and HBase
[[1]] Copy Chukwa files to Hadoop and HBase directories:
cp $CHUKWA_HOME/share/chukwa/chukwa-${VERSION}-client.jar $HADOOP_HOME/share/hadoop/common/lib
cp $CHUKWA_HOME/share/chukwa/lib/json-simple-${json-simpleVersion}.jar $HADOOP_HOME/share/hadoop/common/lib
cp $CHUKWA_HOME/etc/chukwa/ $HBASE_CONF_DIR/
cp $CHUKWA_HOME/etc/chukwa/ $HBASE_CONF_DIR/
cp $CHUKWA_HOME/share/chukwa/chukwa-${VERSION}-client.jar $HBASE_HOME/lib
cp $CHUKWA_HOME/share/chukwa/lib/json-simple-${json-simpleVersion}.jar $HBASE_HOME/lib
[[2]] Restart your Hadoop Cluster. General Hadoop configuration is available at: {{{}Hadoop Configuration}}. <<N.B.>> You may see some additional logging messages at this stage which looks as if error(s) are present. These messages are showing up because the log4j socket appender writes to stderr for warn messages when it is unable to stream logs to a log4j socket server. If the Chukwa agent is started with socket adaptors prior to Hadoop and HBase, those messages will not show up. For the time being do not worry about these messages, they will disappear once Chukwa agent is started with socket adaptors.
[[3]] Make sure HBase is started. General HBASE configuration is available at: {{{}HBase Configuration}}
[[4]] After Hadoop and HBase are started, run:
bin/hbase shell < $CHUKWA_HOME/etc/chukwa/hbase.schema
This procedure initializes the default Chukwa HBase schema.
* Configuring And Starting Chukwa Agent
[[1]] Edit CHUKWA_HOME/etc/chukwa/ Make sure that JAVA_HOME, HADOOP_CONF_DIR, and HBASE_CONF_DIR are set correctly.
[[2]] Edit CHUKWA_HOME/etc/chukwa/chukwa-agent-conf.xml. Make sure that are set correctly.
[[3]] In CHUKWA_HOME, run:
sbin/ start agent
* Setup Solr to index Service log files
[[1]] Start Solr ${solrVersion} with Chukwa Solr configuration:
bin/solr start -cloud -z localhost:2181
./bin/solr create_collection -c chukwa -n chukwa
* Start HICC
The Hadoop Infrastructure Care Center (HICC) is the Chukwa web user interface.
[[1]] To start HICC, do the following:
sbin/ start hicc
* Data Visualization
[[1]] Once the webcontainer with HICC has been started, point your favorite browser to:
[[2]] The default user name and password is "admin" without quotes.
[[3]] Metrics data collected by Chukwa Agent will be browsable through Graph Explorer widget.