Allitebooks - Programming Ebooks

Transcription

www.allitebooks.com

Monitoring HadoopGet to grips with the intricacies of Hadoop monitoringusing the power of Ganglia and NagiosGurmukh SinghBIRMINGHAM - MUMBAIwww.allitebooks.com

Monitoring HadoopCopyright 2015 Packt PublishingAll rights reserved. No part of this book may be reproduced, stored in a retrievalsystem, or transmitted in any form or by any means, without the prior writtenpermission of the publisher, except in the case of brief quotations embedded incritical articles or reviews.Every effort has been made in the preparation of this book to ensure the accuracyof the information presented. However, the information contained in this book issold without warranty, either express or implied. Neither the author, nor PacktPublishing, and its dealers and distributors will be held liable for any damagescaused or alleged to be caused directly or indirectly by this book.Packt Publishing has endeavored to provide trademark information about all of thecompanies and products mentioned in this book by the appropriate use of capitals.However, Packt Publishing cannot guarantee the accuracy of this information.First published: April 2015Production reference: 1240415Published by Packt Publishing Ltd.Livery Place35 Livery StreetBirmingham B3 2PB, UK.ISBN 978-1-78328-155-8www.packtpub.com[ FM-2 ]www.allitebooks.com

CreditsAuthorProject CoordinatorGurmukh SinghNidhi JoshiReviewersProofreadersDavid GrecoSafis EditingRandal Scott KingPaul HindleYousuf QureshiIndexerHemangini BariAcquisition EditorMeeta RajaniGraphicsContent Development EditorDisha HariaSiddhesh SalviProduction CoordinatorMelwyn D'saTechnical EditorParag TopreCover WorkMelwyn D'saCopy EditorsHiral BhatSarang ChariTani KothariTrishla Singh[ FM-3 ]www.allitebooks.com

About the AuthorGurmukh Singh has been an infrastructure engineer for over 10 years and hasworked on big data platforms in the past 5 years. He started his career as a fieldengineer, setting up lease lines and radio links. He has vast experience in enterpriseservers and network design and in scaling infrastructures and tuning them forperformance. He is the founder of a small start-up called Netxillon Technologies,which is into big data training and consultancy. He talks at various technicalmeetings and is an active participant in the open source community's activities.He writes at http://linuxaddict.org and maintains his Github account athttps://github.com/gdhillon.[ FM-4 ]www.allitebooks.com

About the ReviewersDavid Greco is a software architect with more than 27 years of experience.He started his career as a researcher in the field of high-performance computing;thereafter, he moved to the business world, where he worked for different enterprisesoftware vendors and two start-ups he helped create. He played different roles, thoseof a consultant and software architect and even a CTO. He's an enthusiastic explorerof new technologies, and he likes to introduce new technologies into enterprisesto improve their businesses. In the past 5 years, he has fallen in love with big datatechnologies and typed functional programming—Scala and Haskell. When notworking or hacking, he likes to practice karate and listen to jazz and classical music.Randal Scott King is the managing partner of Brilliant Data, a global consultancyspecializing in big data, analytics, and network architecture. He has done work forindustry-leading clients, such as Sprint, Lowe's Home Improvement, GulfstreamAerospace, and AT&T. In addition to the current book, he was previously a reviewerfor Hadoop MapReduce v2 Cookbook, Second Edition, Packt Publishing.Scott lives with his children on the outskirts of Atlanta, GA. You can visit his blogat www.randalscottking.com.[ FM-5 ]www.allitebooks.com

Yousuf Qureshi is an early adopter of technology and gadgets, has a lot ofexperience in the e-commerce, social media, analytics, and mobile apps sectors,and is a Cloudera Certified Developer for Apache Hadoop (CCDH).His expertise includes development, technology turnaround, consultancy, andarchitecture. He is an experienced developer of Android, iOS, Blackberry, ASP.NETMVC, Java, MapReduce, Distributed Search and Inverted Index algorithms, Hadoop,Hive, Apache Pig, Media API integration, and multiplatform applications. He hasalso reviewed Instant jQuery Drag-and-Drop Grids How-to, Packt Publishing, earlier.Special thanks go to my, wife Shakira Yousuf, and daughter,Inaaya Yousuf.[ FM-6 ]www.allitebooks.com

www.PacktPub.comSupport files, eBooks, discount offers,and moreFor support files and downloads related to your book, please visit www.PacktPub.com.Did you know that Packt offers eBook versions of every book published, with PDF andePub files available? You can upgrade to the eBook version at www.PacktPub.com andas a print book customer, you are entitled to a discount on the eBook copy. Get in touchwith us at service@packtpub.com for more details.At www.PacktPub.com, you can also read a collection of free technical articles, sign upfor a range of free newsletters and receive exclusive discounts and offers on Packt booksand n/packtlibDo you need instant solutions to your IT questions? PacktLib is Packt's online digitalbook library. Here, you can search, access, and read Packt's entire library of books.Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browserFree access for Packt account holdersIf you have an account with Packt at www.PacktPub.com, you can use this to accessPacktLib today and view 9 entirely free books. Simply use your login credentials forimmediate access.[ FM-7 ]www.allitebooks.com

www.allitebooks.com

Table of ContentsPrefaceChapter 1: Introduction to MonitoringThe need for monitoringThe monitoring tools available in the marketNagiosNagios architecturePrerequisites for installing and configuring NagiosInstalling NagiosWeb interface configurationNagios pluginsVerificationConfiguration filesSetting up monitoring for clientsGangliaGanglia componentsGanglia installationv122333457778111112System loggingCollectionTransportationStorageAlerting and analysisThe syslogd and rsyslogd daemonsSummaryChapter 2: Hadoop Daemons and ServicesHadoop daemonsNameNodeDataNode and TaskTrackerSecondary NameNodeJobTracker and YARN daemonsThe communication between 9202021

Table of ContentsYARN frameworkCommon issues faced on Hadoop clusterHost-level checksNagios serverConfiguring Hadoop nodes for monitoringSummary232425262728Chapter 3: Hadoop Logging29Chapter 4: HDFS Checks37Chapter 5: MapReduce Checks45Chapter 6: Hadoop Metrics and Visualization Using Ganglia53The need for logging eventsSystem loggingLogging levelsLogging in HadoopHadoop logsHadoop log levelHadoop auditSummary3030313233343536HDFS overviewNagios master configurationThe Nagios client configurationSummary38394344MapReduce overviewMapReduce control commandsMapReduce health checksNagios master configurationNagios client configurationSummaryHadoop metricsMetrics contextsNamed contextsMetrics system designMetrics configurationConfiguring Metrics2Exploring the metrics contextsHadoop Ganglia integrationHadoop metrics configuration for GangliaSetting up Ganglia nodes[ ii ]46464848525254545455565759596061

Table of ContentsHadoop configurationMetrics1Metrics2Ganglia graphsMetrics APIsThe org.apache.hadoop.metrics packageThe org.apache.hadoop.metrics2 packageSummary6262636464646565Chapter 7: Hive, HBase, and Monitoring Best Practices67Index77Hive monitoringHive metricsHBase monitoringHBase Nagios monitoringHBase metricsMonitoring best practicesThe Filter classNagios and Ganglia best practicesSummary[ iii ]676869697173747475

PrefaceMany organizations are implementing Hadoop in production environments, storingcritical data on it, and making sure everything is in place and running as desired asit is crucial for the business. If something breaks down, how quickly you can detectit and remediate it is very important. In order to have early detection of any failures,there is a need to have monitoring in place and capture events that let you peepinto the internal workings of a Hadoop cluster. The goal of this book is to enablemonitoring and capture events to make sure that the Hadoop clusters are up andrunning to the optimal capacity.What this book coversChapter 1, Introduction to Monitoring, discusses the need for monitoring and the toolsavailable in the market for that. This chapter also provides details about installingNagios and Ganglia, which are the tools to monitor and capture metrics for aHadoop cluster.Chapter 2, Hadoop Daemons and Services, discusses the Hadoop services and daemonsand how they communicate. Before implementing monitoring, one must understandhow Hadoop components talk to each other and what ports the services run on.Chapter 3, Hadoop Logging, discusses how system logging works and how thatextends to logging in Hadoop clusters. This chapter also covers the logging detailsfor various Hadoop daemons.Chapter 4, HDFS Checks, explores the HDFS checks, which can be implemented forHadoop File System and its components, such as NameNode, DataNode, and so on.Chapter 5, MapReduce Checks, discusses configuring checks for MapReducecomponents, such as JobTracker, TaskTracker, ResourceManager, and otherYARN components.[v]

PrefaceChapter 6, Hadoop Metrics and Visualization Using Ganglia, provides a step-by-stepguide to configuring a Hadoop metrics collection and its visualization using Ganglia.Chapter 7, Hive, HBase, and Monitoring Best Practices, provides an introduction tometrics collection and monitoring for the Hive and HBase components of theHadoop framework. It also talks about the best practices for monitoring on alarge scale and how to keep the utilization of the monitoring servers optimized.What you need for this bookTo practice the examples provided in this book, you will need a working Hadoopcluster. It is recommended that you use Cent OS 6.0 at the minimum and ApacheHadoop 1.2.1 and Hadoop 2.6.0 for the Hadoop version 1 and Hadoop version 2examples, respectively.Who this book is forMonitoring Hadoop is ideal for Hadoop administrators who need to monitor theirHadoop clusters and make sure they are running optimally. This book acts as areference to set up Hadoop monitoring and visualization using Ganglia.ConventionsIn this book, you will find a number of text styles that distinguish between differentkinds of information. Here are some examples of these styles and an explanation oftheir meaning.Code words in text, database table names, folder names, filenames, file extensions,pathnames, dummy URLs, user input, and Twitter handles are shown as follows:"This is the port for ResourceManager scheduler; the default is 8030."A block of code is set as follows:log4j.appender.DRFAAUDIT ender.DRFAAUDIT.File tern .yyyy-MM-ddlog4j.appender.DRFAAUDIT.layout org.apache.log4j.PatternLayout[ vi ]

PrefaceWhen we wish to draw your attention to a particular part of a code block, therelevant lines or items are set in bold:log4j.appender.DRFAAUDIT ender.DRFAAUDIT.File tern .yyyy-MM-ddlog4j.appender.DRFAAUDIT.layout org.apache.log4j.PatternLayoutAny command-line input or output is written as follows: sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgNew terms and important words are shown in bold. Words that you see on thescreen, for example, in menus or dialog boxes, appear in the text like this: "If you seea message, such as Return code of 127 is out of bounds – plugin may be missing onthe right panel, then this means that your configuration is correct as of now."Warnings or important notes appear in a box like this.Tips and tricks appear like this.Reader feedbackFeedback from our readers is always welcome. Let us know what you think aboutthis book—what you liked or disliked. Reader feedback is important for us as it helpsus develop titles that you will really get the most out of.To send us general feedback, simply e-mail feedback@packtpub.com, and mentionthe book's title in the subject of your message.If there is a topic that you have expertise in and you are interested in either writingor contributing to a book, see our author guide at www.packtpub.com/authors.Customer supportNow that you are the proud owner of a Packt book, we have a number of thingsto help you to get the most from your purchase.[ vii ]

PrefaceErrataAlthough we have taken every care to ensure the accuracy of our content, mistakesdo happen. If you find a mistake in one of our books—maybe a mistake in the text orthe code—we would be grateful if you could report this to us. By doing so, you cansave other readers from frustration and help us improve subsequent versions of thisbook. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Formlink, and entering the details of your errata. Once your errata are verified, yoursubmission will be accepted and the errata will be uploaded to our website or addedto any list of existing errata under the Errata section of that title.To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The requiredinformation will appear under the Errata section.PiracyPiracy of copyrighted material on the Internet is an ongoing problem across allmedia. At Packt, we take the protection of our copyright and licenses very seriously.If you come across any illegal copies of our works in any form on the Internet, pleaseprovide us with the location address or website name immediately so that we canpursue a remedy.Please contact us at copyright@packtpub.com with a link to the suspectedpirated material.We appreciate your help in protecting our authors and our ability to bring youvaluable content.QuestionsIf you have a problem with any aspect of this book, you can contact us atquestions@packtpub.com, and we will do our best to address the problem.[ viii ]

Chapter 1Introduction to MonitoringIn any enterprise, no matter how big or small, it is very important to monitor thehealth of all its components such as servers, network devices, databases, and so on,and make sure that things are working as intended. Monitoring is a critical partfor any business that is dependent upon infrastructure. This can be done by givingsignals to enable the necessary actions in case of any failures.In a real production environment, monitoring can be very complex with manycomponents and configurations. There might be different security zones, differentways in which servers are set up, or the same database might have been used inmany different ways with servers listening to various service ports.Before diving into setting up monitoring and logging for Hadoop, it is veryimportant to understand the basics of monitoring, how it works, and somecommonly used tools in the market. In Hadoop, we can monitor the resources,services, and also collect the metrics of various Hadoop counters. In this book,we will be looking at monitoring and metrics collection.In this chapter, we will begin our journey by exploring the open source monitoringtools that we use in enterprises, and learn how to configure them.The following topics will be covered in this chapter: Some of the widely used monitoring tools Installing and configuring Nagios Installing and configuring Ganglia Understanding how system logging works[1]

Introduction to MonitoringThe need for monitoringIf we have tested our code and found that the functionality and everything else isfine, then why do we need monitoring?The production load might be different from what we tested and found, there couldbe human errors while conducting the day-to-days operations, someone could haveexecuted a wrong command or added a wrong configuration. There could also behardware/network failures that could make your application unavailable. How longcan you afford to keep the application down? Maybe for a few minutes or for a fewhours, but what about the revenue loss, or what if it is a critical application for carryingout financial transactions? We need to respond to the failures as soon as possible, andthis can be done only if we perform early detections and send out notifications.The monitoring tools available in themarketIn the market, there are many tools are available for monitoring, but the importantthings to keep in mind are as follows: How easy it is to deploy and maintain the tool The license costs, but more importantly the TCO (Total Cost of Ownership) Can it perform standard checks, and how easy is to write custom plugins Overhead in terms of CPU and memory usage User interfaceSome of the monitoring tools available in the market are BandwidthD,EasyNetMonitor, Zenoss, NetXMS, Splunk, and many more.Of the many tools available, Nagios and Ganglia are most widely deployed formonitoring the Hadoop clusters. Many Hadoop vendors, such as Cloudera andHortonworks use Nagios and Ganglia for monitoring their clusters.[2]

Chapter 1NagiosNagios is a powerful monitoring system that provides you with instant awarenessabout your organization's mission-critical IT infrastructure.By using Nagios, you can do the following: Plan the release cycle and the rollouts, before things are outdated Early detection, before it causes an outage Have automation and a better response across the organization Find hindrances in the infrastructure, which could impact the SLAsNagios architectureThe Nagios architecture was designed keeping in mind flexibility and scalability.It consists of a central server, which is referred to as the Monitoring Server and theclients are the Nagios agents, that run on each node that needs to be monitored.The checks can be performed for service, port, memory, disk, and so on, by usingeither active checks or passive checks. The active checks are initiated by the Nagiosserver and the passive checks are initiated by the client. Its flexibility allows us tohave programmable APIs and customizable plugins for monitoring.Prerequisites for installing and configuring NagiosNagios is an enterprise class monitoring solution, which can manage a large numberof nodes. It can be scaled easily, and it has the ability to write custom plugins foryour applications. Nagios is quite flexible and powerful, and it supports manyconfigurations and components.Nagios is such a vast and extensive product that this chapter is inno way a reference manual for it. This chapter is written with theprimary aim of setting up monitoring, as quickly as possible, andfamiliarizing the readers with it.[3]

Introduction to MonitoringPrerequisitesAlways set up a separate host as the monitoring node/server and do not install othercritical services on it. The number of hosts that are monitored can be a few thousand,with each host having from 15 to 20 checks that can be either active or passive.Before starting with the installation of Nagios, make sure that Apache HTTP Serverversion 2.0 is running and gcc and gd have been installed. Make sure that you arelogged in as root or as with sudo privileges. Nagios runs on many platforms, suchas RHEL, Fedora, Windows, CentOS; however, in this book we will use the CentOS6.5 platform. ps -ef grep httpd service httpd status rpm -qa grep gcc rpm -qa grep gdInstalling NagiosLet's look at the installation of Nagios, and how we can set it up. The following stepsare for Rhel, CentOS, Fedora, and Ubuntu: Download Nagios and the Nagios plugin from the Nagios repository,which can be found at http://www.nagios.org/download/. The latest stable version of Naigos at the time of writing this chapter wasnagios-4.0.8.tar.gz. Create a Nagios user to manage the Nagios interface. You have to execute thecommands as either root or with sudo privileges. You can download it either from http://sourceforge.net/ or from anyother commercial site, but a few sites might ask for registration. sudo /usr/sbin/useradd -m nagios passwd nagios Create a new nagcmd group so that external commands can be submittedthrough the web interface. If you prefer, you can download the file directly into the user'shome directory.[4]

Chapter 1 Create a Nagios user and an Apache user, as a part of the group. sudo /usr/sbin/groupadd nagcmd sudo /usr/sbin/usermod -a -G nagcmd nagios sudo /usr/sbin/usermod -a -G nagcmd apacheLet's start with the configuration.Navigate to the directory, where the package was downloaded. The downloadedpackage could be either in the Downloads folder or in the present working directory. tar zxvf nagios-4.0.8.tar.gz cd nagios-4.0.8/ ./configure –with-command-group nagcmdOn Red Hat, the . /configure command might not work and mighthang while displaying the message. So, add –enable-redhatpthread-workaround to the . /configure command as a workaround for the preceding problem, as follows: make all; sudo make install; sudo make install-init sudo make install-config; sudo make install-commandmodeWeb interface configuration After installing Nagios, we need to do a minimal level of configuration.Explore the /usr/local/nagios/etc directory for a few samples. Update /usr/local/nagios/etc/objects/contacts.cfg, with the e-mailaddress on which you want to receive the alerts. Secondly, we need to configure the web interface through which we willmonitor and manage the services. Install the Nagios web configuration filein the Apache configuration directory using the following command: sudo make install-webconf The preceding command will work only in the extracted directory of theNagios. Make sure that you have extracted Nagios from the TAR file andare in that directory.[5]

Introduction to Monitoring Create an nagadm account for logging into the Nagios web interface using thefollowing command: sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagadm Reload apache, to read the changes, using the following command: sudo service httpd restart sudo /etc/init.d/nagios restart Open http://localhost/nagios/ in any browser on your machine.If you see a message, such as Return code of 127 is out of bounds – plugin may bemissing on the right panel, then this means that your configuration is correct as ofnow. This message indicates that the Nagios plugins are missing, and we will showyou how to install these plugins in the next step.[6]

Chapter 1Nagios pluginsNagios provides many useful plug-ins to get us started with monitoring all thebasics. We can write our custom checks and integrate it with other plug-ins, such ascheck disk, check load, and many more. Download the latest stable version of theplugins and then extract them. The following command lines help you in extractingand installing Nagios plugins: tar zxvf nagios-plugins-2.x.x.tar.gz cd nagios-plugins-2.x.x/ ./configure -–with-nagios-user nagios -–with-nagios- group nagios make ; sudo make installAfter the installation of the core and the plug-in packages, we will be ready tostart nagios.VerificationBefore starting the Nagios service, make sure that there are no configuration errorsby using the following command: sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgStart the nagios service by using the following command: sudo service nagios start sudo chkconfig --–add nagios; sudo chkconfig nagios onConfiguration filesThere are many configuration files in Nagios, but the major ones are located underthe /usr/local/nagios/etc directory:Configuration FileDescriptionnagios.cfgThis controls the nagios behavior and contains theglobal directives.cgi.cfgThis is the user interface configuration file.resource.cfgTo safeguard any sensitive information, such aspasswords, this file has been made in such a way that itis readable only by the nagios user.[7]

Introduction to MonitoringThe other configuration files under the /usr/local/nagios/etc/objects directoryare described as follows:Configuration FileDescriptioncontacts.cfgThis contains a list of the users who need to be notified bythe alerts.commands.cfgAll the commands to check the services are defined here.Use Macros for command substitution.localhost.cfgThis is a baseline file to define the other hosts whom youwould like to monitor.The nagios.conf file under /usr/local/nagios/etc/ is the main configurationfile with various directives that define what all the files include. For example,cfg dir directory name .Nagios will recursively process all the configuration files in the subdirectories of thedirectory that you specify with this directive as follows:cfg dir /usr/local/nagios/etc/commandscfg dir /usr/local/nagios/etc/servicescfg dir /usr/local/nagios/etc/hostsSetting up monitoring for clientsThe Nagios server can do an active or a passive check. If the Nagios server proactivelyinitiates a check, then it is an active check. Otherwise, it is a passive check.The following are the steps for setting up monitoring for clients:1. Download NRPE addon from http://www.nagios.org and then installcheck nrpe.2. Create a host and a service definition for the host to be monitored bycreating a new configuration file, /usr/local/nagios/etc/objects/clusterhosts.cfg for that particular group of nodes.[8]

Chapter 1Configuring a disk checkdefine host {use linux-serverhost name remotehostalias RemoteHost address 192.168.0.1contact groups admins}Service definition sample:define service {use generic-serviceservice description Root Partitioncontact groups adminscheck command check nrpe!check disk}NRPEcheck diskNRPENagios MasterNagios Clientscheck cpucheck http[9]

Introduction to MonitoringCommunication among NRPE components: The NRPE on the server (check nrpe) executes the check on theremote NRPE The check is returned to the Nagios server through the NRPE on theremote hostOn each of the client hosts, perform the following steps:1. Install the Nagios Plugins and the NRPE addon, as explained earlier.2. Create an account to run nagios from, which can be under any username.[client] # useradd nagios; passwd nagios3. Install nagios-plugin with the LD flags:[client] # tar xvfz nagios-plugins-2.x.x.tar.gz; cd nagiosplugins-2.x.x/[client]# export LDFLAGS -ldl[client]# ./configure –with-nagios-user nagios –with- nagiosgroup nagios –enable-redhat-pthread-workaround[client]# make; make install4. Change the ownership of the directories, where nagios was installed by thenagios user:[client]# chown nagios.nagios /usr/local/nagios[client]# chown -R nagios.nagios /usr/local/nagios/libexec/5. Install NRPE and run it as daemon:[client]# tar xvfz nrpe-2.x.tar.gz; cd nrpe-2.x[client]# ./configure; make all ;make install-plugin; makeinstall-daemon; make install-daemon-config; make install-xinetd6. Start the service, after creating the /et/xinet.d/nrpe file with the IP ofthe server:[client#] service xinetd restart[ 10 ]

Chapter 17. Modify the /usr/local/nagios/etc/nrpe.cfg configuration file:command[check disk] /usr/local/nagios/libexec/check disk -w 20%-c 10% -p /dev/hda1After getting a good insight into Nagios, we are ready to understand its deploymentin the Hadoop clusters.The second tool that we will look into is Ganglia. It is a beautiful tool for aggregatingstats and plotting them nicely. Nagios gives the events and alerts, Ganglia aggregatesand presents them in a meaningful way. What if you want to look for the total CPU,memory per cluster of 2000 nodes or total free disk space on 1000 nodes? Plotting the CPUmemory for one node is easy, but aggregating it for a group on a node requires a toolthat can do this.GangliaGanglia is an open source, distributed monitoring platform for collecting metricsacross the cluster. It can do aggregation on CPU, memory, disk I/O, and many morecomponents across a group of nodes. There are alternate tools, such as Cacti andMunin, but Ganglia scales very well for large enterprises.Some of the key features of Ganglia are as follows: You can view historical and real time metrics of a single node or for anentire cluster You can use the data to make decisions on the cluster sizing andthe performanceGanglia componentsWe will now discuss some components of Ganglia. Ganglia Monitoring Daemon (gmond): It runs on the nodes that need to bemonitored, and it captures the state change and sends updates to a centraldaemon by using XDR.[ 11 ]

Introduction to Monitoring Ganglia Meta Daemon (gmetad): It collects data from gmond and the othergmetad daemons. The data is indexed and stored on the disk in a round robinfashion. There is also a Ganglia front-end for a meaningful display of theinformation collected.node1gmond clusternode2node3gmetad fortend/Web servernode1gmeladnode2Ganglia installationLet's begin by setting up Ganglia, and see what the important parameters thatneed to be taken care of are. Ganglia can be downloaded from http://ganglia.sourceforge.net/. Perform the following steps to install Ganglia:1. Install gmond on the nodes that need to be monitored: sudo apt-get install ganglia-monitorConfigure /etc/ganglia/gmond.confglobals {daemonize yessetuid yesuser gangliadebug level 0max udp msg len 1472mute nodeaf nohost dmax 0cleanup threshold 600gexec nosend metadata interval 0[ 12 ]

Chapter 1}udp send channel {host gmetad.cluster1.comport 8649}udp recv channel {port 8649}tcp accept channel {port 8649}2. Restart the Ganglia service: service ganglia-monitor restartgmetadfortendRRDgmetad polling XML over TCPgmeladgmondgmondXDR over UDP3. Install gmetad on the master node. It can be downloaded fromhttp://ganglia.sourceforge.net/: sudo apt-get install gmetad4. Update the gmetad.conf file, which tells you where it wil

Nagios server 26 Configuring Hadoop nodes for monitoring 27 Summary 28 Chapter 3: Hadoop Logging 29 The need for logging events 30 System logging 30 Logging levels 31 Logging in Hadoop 32 Hadoop logs 33 Hadoop log level 34 Hadoop audit 35 Summary 36 Chapter 4: HDFS Checks 37 HDFS overview 38 Nagios master configuration 39