官术网_书友最值得收藏!

Introduction

Nagios Core is perhaps best thought of less as a monitoring tool, and more as a monitoring framework. Its modular design can use any kind of program which returns appropriate values based on some kind of check, such as a check_command plugin for a host or service. This is where the concepts of commands and plugins come into play.

For Nagios Core, a plugin is any program that can be used to gather information about a host or service. To ensure that a host was responding to PING requests, we'd use a plugin, such as check_ping, which when run against a hostname or address—whether by Nagios Core or not—would return a status code to whatever called it, based on whether a response was received to the PING request within a certain period of time. This status code and any accompanying message is what Nagios Core uses to establish what state a host or service is in.

Plugins are generally just like any other program on a Unix-like system; they can be run from the command line, are subject to permissions and owner restrictions, can be written in any programming language, and can take parameters and options to modify how they work. Most importantly, they are entirely separate from Nagios Core itself (even if programmed by the same people), and the way that they're used by the application can be changed.

To allow for additional flexibility in how plugins are used, Nagios Core uses these programs according to the terms of a command definition. A command for a specific plugin defines the way in which that plugin is used, including its location in the filesystem, any parameters it should be passed, and any other options. In particular, parameters and options often include thresholds for WARNING and CRITICAL states.

Nagios Core is usually downloaded and installed along a set of plugins called Nagios Plugins, available at http://www.nagiosplugins.org/, which this book assumes you have installed. These plugins were chosen because, as a set, they cover the most common needs for a monitoring infrastructure quite well, including checks for common services, such as web, mail services, and DNS services, as well as more generic checks, such as whether a TCP or UDP port is accessible and open on a server. It's likely that for most of our monitoring needs, we won't need any other plugins; but if we do, Nagios Core makes it possible to use existing plugins in novel ways using custom command definitions, adding third-party plugins written by contributors on the Nagios Exchange website, or even writing custom plugins ourselves from scratch in some special cases.

主站蜘蛛池模板: 张北县| 镇康县| 石阡县| 察隅县| 景德镇市| 连江县| 中方县| 潮州市| 茶陵县| 巴南区| 禹城市| 城固县| 景洪市| 舟山市| 陵川县| 南昌市| 灵寿县| 华蓥市| 青岛市| 陇西县| 张掖市| 阿尔山市| 余庆县| 依安县| 五峰| 白水县| 栾城县| 石棉县| 永春县| 上栗县| 福海县| 望谟县| 西充县| 方城县| 中牟县| 肇州县| 吉木乃县| 长顺县| 福鼎市| 牟定县| 齐齐哈尔市|