1. Trang chủ
  2. » Công Nghệ Thông Tin

nagios core administration cookbook

366 722 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

www.it-ebooks.info Nagios Core Administration Cookbook Develop an integrated monitoring solution for virtually any kind of network Tom Ryder BIRMINGHAM - MUMBAI www.it-ebooks.info Nagios Core Administration Cookbook Copyright © 2013 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: January 2013 Production Reference: 1180113 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-84951-556-6 www.packtpub.com Cover Image by Gavin Doremus (gdoremus24@gmail.com) www.it-ebooks.info Credits Author Tom Ryder Reviewers Emmanuel Dyan John C. Kennedy Pierguido Lambri Acquisition Editor Jonathan Titmus Commissioning Editor Shreerang Deshpande Lead Technical Editor Kedar Bhat Technical Editor Lubna Shaikh Project Coordinator Abhishek Kori Proofreaders Bernadette Watkins Maria Gould Indexer Monica Ajmera Graphics Aditi Gajjar Production Coordinator Manu Joseph Cover Work Manu Joseph www.it-ebooks.info About the Author Tom Ryder is a systems administrator and former web developer from New Zealand. He uses Nagios Core as part of his "day job" as a systems administrator, monitoring the network for a regional Internet Service Provider. Tom works a great deal with UNIX-like systems, being a particular fan of GNU/Linux, and writes about usage of open source command line development tools on his blog Arabesque: http://www.blog.sanctum. geek.nz. Thanks are of course due to Ethan Galstad and the Nagios Core development team for writing and maintaining Nagios Core, along with the reference manual against which the book's material was checked. Thanks are also due to my loving partner Chantelle Potroz for her patience and support as this book was being written, and to my employer James Watts of Inspire Net Limited for permission to write it. Thanks also to Shreerang Deshpande and Kedar Bhat from Packt for their patience and technical guidance during the book's development. The map of Australia used for the background to the network map in Chapter 8, Managing Network Layout, is sampled from the public domain images available on the superb Natural Earth website, viewable at http://www.naturalearthdata.com/. www.it-ebooks.info About the Reviewers Emmanuel Dyan is an expert in web development and in all the technologies gravitating around the Web: servers, network infrastructures, languages, and software. He has been managing his own company, iNet Process, since 2004. He opened a branch in India in 2006 for its development needs, and recruited the staff. He then had to dene the working procedures as well as the tools and set up the work environment. iNet Process implements and hosts CRM solutions based on SugarCRM. Its clients are mainly from France and are big, medium, as well as small companies. Emmanuel teaches development languages, IT strategies, and CMS (Drupal) in a French University (Paris-Est Marne-la-Vallée) for students preparing for a Master's degree. John C. Kennedy has been administering UNIX and Linux servers and workstations since 1997. He has experience with Red Hat, SUSE, Ubuntu, Debian, Solaris, and HP-UX. John is also experienced in BASH shell scripting and is currently teaching himself Python and Ruby. John has also been a technical editor for various publishers for over 10 years specializing in open source related books. When John is not geeking out in front of either a home or work computer, he helps out with a German Shepherd rescue centre in Virginia by fostering some great dogs or helping the centre with their IT needs. I would like to thank my family (my wonderful wife, Michele, my intelligent and caring daughter Denise, and my terric and smart son, Kieran) for supporting the (sometimes) silly things and not so silly things I do. I'd also like to thank my current foster dogs for their occasional need to keep their legs crossed a little longer while I test things out from the book and forget they are there. www.it-ebooks.info Pierguido Lambri has more than 10 years of experience with GNU/Linux and with the system administration side. He has worked with many operating systems (proprietary and open source), but he's a fan of the open source movement. Interested in everything that has to do with IT, he always likes to learn about new technologies. Thanks to Abhishek Kori and Kedar Bhat for the opportunity of the book review. www.it-ebooks.info www.PacktPub.com Support les, eBooks, discount offers and more You might want to visit www.PacktPub.com for support les and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub les available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. TM http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? f Fully searchable across every book published by Packt f Copy and paste, print and bookmark content f On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. www.it-ebooks.info www.it-ebooks.info Table of Contents Preface 1 Chapter 1: Understanding Hosts, Services, and Contacts 7 Introduction 7 Creating a new network host 8 Creating a new HTTP service 13 Creating a new e-mail contact 17 Verifying conguration 20 Creating a new hostgroup 22 Creating a new servicegroup 25 Creating a new contactgroup 29 Creating a new time period 32 Running a service on all hosts in a group 34 Chapter 2: Working with Commands and Plugins 37 Introduction 37 Finding a plugin 38 Installing a plugin 40 Removing a plugin 43 Creating a new command 44 Customizing an existing command 47 Using an alternative check command for hosts 50 Writing a new plugin from scratch 53 Chapter 3: Working with Checks and States 61 Introduction 61 Specifying how frequently to check a host or service 62 Changing thresholds for PING RTT and packet loss 66 Changing thresholds for disk usage 69 Scheduling downtime for a host or service 72 www.it-ebooks.info [...]... working Nagios Core 3.0 or greater installation with a web interface, with all the Nagios Core Plugins installed If you have not yet installed Nagios Core, then you should start with the QuickStart guide: http:/ /nagios. sourceforge.net/docs/ 3_0/quickstart.html 8 www.it-ebooks.info Chapter 1 We'll assume that the configuration file that Nagios Core reads on startup is located at /usr/local /nagios/ etc /nagios. cfg,... advanced Nagios Core configuration, it also does not discuss any configuration frontends or wizards such as NConf Finally, as a Packt open source series book focusing on the use of the freely available Nagios Core, it also does not directly discuss the use of Nagios XI, the commercial version of the software supported by the Nagios team This is done to instill a thorough understanding of Nagios Core itself,... notification_interval notification_period 24x7 check-host-alive nagiosadmin 60 24x7 } 3 Change directory to /usr/local /nagios/ etc, and edit the nagios. cfg file: # cd # vi nagios. cfg 4 At the end of the file add the following line: cfg_file=/usr/local /nagios/ etc/objects/sparta.naginet.cfg 5 Restart the Nagios Core server: # /etc/init.d /nagios restart If the server restarted successfully, the web interface... we're referring to a command defined in Nagios Core' s default configuration called check_http, which refers to a plugin of the same name in the Nagios Core Plugins set ff max_check_attempts: This defines the number of times Nagios Core should attempt to re-check the service after finding it in a state other than OK ff check_interval: This defines how long Nagios Core should wait between checks when the... /etc/init.d /nagios restart Running configuration check CONFIG ERROR! your Nagios configuration Restart aborted Getting ready You should have a working Nagios Core 3.0 or better server running 20 www.it-ebooks.info Check Chapter 1 How to do it We can verify the Nagios Core configuration as follows: 1 Run the following command, substituting the path to the Nagios binary file and our primary nagios. cfg... Nagios binary file and our primary nagios. cfg configuration file, if necessary: # /usr/local /nagios/ bin /nagios -v /usr/local /nagios/ etc /nagios. cfg 2 If the output is very long, then it might be a good idea to pipe it through a pager program, such as less: # /usr/local /nagios/ bin /nagios -v /usr/local /nagios/ etc /nagios. cfg | less 3 Inspect the output and look for warnings and problems Here's an example... and Extending Nagios Core, explains how to submit check results from other programs (including NSCA) to provide information about external processes via the commands file, and an introduction to a few popular add-ons (NDOUtils, NagVis, and Nagiosgrapher) What you need for this book In an attempt to work with a "standard" installation of Nagios Core, this book's recipes assume that Nagios Core 3.0 or... defines the number of times Nagios Core should try to repeat the check if checks fail Here, we've defined a value of 3, meaning that Nagios Core will try two more times to PING the target host after first finding it down ff check_period: This references the time period that the host should be checked 24x7 is a time period defined in the default configuration for Nagios Core This is a sensible value... check_http, which in turn uses one of the standard set of Nagios Core plugins, also called check_http If you don't yet have a web server defined as a host in Nagios Core, then you may like to try the Creating a new network host recipe in this chapter After we've done this, not only will our host be checked for a PING response by check_ command, but Nagios Core will also run a periodic check to ensure that... daemon on that host is responding to a simple HTTP/1.1 request If Nagios Core can't get a response to its check, then it will flag the state of the service as CRITICAL, and will try again up to two more times before sending a notification The service will be visible in the Nagios Core web interface and we can check its state at any time Nagios Core will continue testing the server on a regular basis and . www.it-ebooks.info Nagios Core Administration Cookbook Develop an integrated monitoring solution for virtually any kind of network Tom Ryder BIRMINGHAM - MUMBAI www.it-ebooks.info Nagios Core Administration. NagVis, and Nagiosgrapher). What you need for this book In an attempt to work with a "standard" installation of Nagios Core, this book's recipes assume that Nagios Core 3.0 or. reporting for Nagios Core, rather than being a list of instructions for using specic plugins, of which there are many hundreds available online at the Nagios Exchange at http://exchange .nagios. org/.

Ngày đăng: 05/05/2014, 11:53

Xem thêm: nagios core administration cookbook

TỪ KHÓA LIÊN QUAN

Mục lục

    Chapter 1: Understanding Hosts, Services, and Contacts

    Creating a new network host

    Creating a new HTTP service

    Creating a new e-mail contact

    Creating a new hostgroup

    Creating a new servicegroup

    Creating a new contactgroup

    Creating a new time period

    Running a service on all hosts in a group

    Chapter 2: Working with Commands and Plugins

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN