Nagios是一个监视系统运行状态和网络信息的监视系统。Nagios能监视所指定的本地或远程主机以及服务,同时提供异常通知功能等
Nagios可运行在Linux/Unix平台之上,同时提供一个可选的基于浏览器的WEB界面以方便系统管理人员查看网络状态,各种系统问题,以及日志等等。
4.0.0正式发布。2013-09-20.这是新的产品系列.包含大量改进以及性能增强等。 Nagios Plugins还是2012-06-27的1.4.16 遗留稳定版是2013-08-30的3.5.1
完全改进:
-
Performance Improvements:
The performance improvements in Nagios Core 4 come primarily from the following areas:
- Core Workers - Core workers are lightweight processes whose only job is to perform checks. Because they are smaller they spawn much more quickly than the the old process which forked the full Nagios Core. In addition, they communicate with the main Nagios Core process using in-memory techniques, eliminating the disk I/O latencies that could previously slow things down, especially in large installations.
- Configuration Verification - Configuration verification has been improved so that each configuration item is verified only once. Previously configuration verification was an O(n2) operation.
- Event Queue - The event queue now uses a data structure that has O(log n) insertion times versus the O(n) insertion time previously. This means that inserting events into the queue uses much less CPU than in Nagios Core 3.
- Macro Resolution - Macros are now sorted on startup so macro lookup can use a binary search. In addition, frequently accessed macros $USERx$, $ARGx$, and $HOSTADDRESS$ are given special case, early lookups.
-
Object Definitions:
The following changes have been made to object definitions:
- The host address attribute is now optional. The address attribute is set to the host name when it is absent. Most configurations set the host name attribute to the DNS host name making the address attribute redundant.
- Both hosts and services now support an hourly value attribute. The hourly value attribute is intended to represent the value of a host or service to an organization and is used by the new minimum value contact attribute.
- Services now support a parents attribute. A service parent performs a function similar to host parents and can be used in place of service dependencies in simple circumstances.
- The failure_prediction_enabled flag has been removed from both host and service object definitions.
- Contacts now support a minimum value attribute. The mininum value attribute is used with the host and service hourly value attributes to determine whether to notify a contact on host and service problems.
- The host obess_over_host and the service obsess_over_service attributes can now both use the shortened attribute obsess.
-
Object Behavior:
- Contact Inheritance - According to the documentation, contacts should only be inherited from host to service if the service has no other contacts whatsoever (and the same goes for escalations), but the way the code previously worked was that it handled contact_groups and contacts directives separately, meaning services with only 'contacts' specified were still eligible for inheriting 'contact_groups' from the host. This has been updated to comply with the documentation.
- Timeperiods - There were several issues processing timeperiods when both exclusions and exceptions were involved. The issues have been corrected.
-
Configuration:
The following changes have been made to the main Nagios Core configuration, nagios.cfg:
- Because there are many ways to obtain object information, the object information is no longer stored if in the object cache if the configuration variable object_cache_file equals '/dev/null'. Setting the variable to '/dev/null' will reduce the disk I/O load.
- Because there are many ways to obtain status information, the status information is no longer stored if in the status data file if the configuration variable status_file equals '/dev/null'. Setting the variable to '/dev/null' will reduce the disk I/O load.
- There is a new configuration variable, log_current_states, which determines whether current states will be logged in the log files when they are rotated. In Nagios Core 3, this was always the behavior and it is the default in Nagios Core 4. Disabling the logging of current states on log rotation can save considerable disk space for large installations.
- There is a new configuration variable, check_workers, which specifies how many worker processes are created when Nagios Core starts. If not specified, the number of worker process is determine by the number of CPUs on the system.
- There is a new configuration variable, query_socket, which specifies the location of thequery handler socket. The default location is /usr/local/nagios/var/rw/nagios.qh.
- The configuration variables, check_result_reaper_frequency andmax_check_result_reaper_time, have been deprecated. Because of the new worker architecture, checks are no longer reaped, but they are fed back to core by the worker processes. As a result, these variables no longer make sense.
- All file and directory configuration variables in the main nagios.cfg can now use paths that are relative to the location of nagios.cfg.
- Although rarely used in the past, creating nagios objects in the main nagios.cfg configuration file was allowed. This is now prohibited.
-
Macros:
- Additions - A new macro, $CHECKSOURCE$, has been added which contains information about what process performed a check.
- Changes - If use_large_installation_tweaks is set, the $HOSTGROUPMEMBERS$ and $SERVICEGROUPMEMBERS$ macros are no longer exported because they can consume the available space for environment variables.
- Macros are normally available as environment variables when check, event handler, notification, and other commands are run. This can be rather CPU intensive in large Nagios installations, so you can disable the export of environment variables completely with theenable_environment_macros option.
- Macro information can be found here.
-
Query Handler:
The query handler is a general purpose communication mechanism that allows external entities to communicate with Nagios Core in a well-defined manner. As of this writing, all communication with the query handler takes place through a Unix-domain socket whose location is defined by the query_socket configuration variable.
There are currently 5 built-in query handlers.
- core - provides Nagios Core management and information
- wproc - provides worker process registration, management and information
- nerd - provides a subscription service to the Nagios Event Radio Dispatcher (NERD)
- help - provides help for the query handler
- echo - implements a basic query handler that simply echoes back the queries sent to it
More information about the query handler interface, including an introduction to creating a custom query handler, can be found in the source-supplied documentation.
-
Core Workers:
Previously, all host and service checks were performed by the full Nagios Core process. This required forking the Nagios Core process for every check. The full Nagios Core process includes a lot of things that are not required to actually perform the check, including check scheduling, downtime handling, processing external commands, etc. As a result, forking the Nagios Core process was much slower than was necessary. When the actual check was run, the forked process again forked a shell to run the check and the shell forked to run the plugin.
In addition, disk files were used as the inter-process communication (IPC) mechanism between the forked Nagios process doing the checking and the main Nagios process handling the check results.
In Nagios Core 4, the process of performing host and service checks is now accomplished using a lightweight worker processes. Standard worker processes start up with the main Nagios Core process and additional, special-purpose workers, can be started at any time after Nagios Core starts. If the check command is "simple" (no shell escapes), the worker process can run the command directly, avoiding the 2 additional forks previously required.
Also in Nagios Core 4, the worker processes report the check results to the main Nagios Core process using in-memory IPC mechanisms (the query handler interface), eliminating the disk I/O bottleneck that used to be an issue in large installations.
When a worker process registers with the main Nagios Core process, it tells Nagios Core what checks it will handle. This feature allows external authors to create special-purpose workers which are optimized to perform certain checks. A sample special-purpose ping check worker is included with the Nagios Core source code in the worker/ping subdirectory.
More information about workers, including an introduction to creating custom workers can be found in the source-supplied documentation.
-
Nagios Event Radio Dispatcher (NERD):
The Nagios Event Radio Dispatcher (NERD) is a query handler based service that streams Nagios Core events to the subscriber. Currently, there are three channels that can be subscribed to: hostchecks, servicechecks and opathchecks.
-
libnagios:
libnagios is a library of functions that can be used by developers of query handlers and worker processes. libnagios currently contains the following components.
- bitmap - bitmap library for calculating dependency graphs
- dkhash - dual-keyed hash api
- fanout - sparsely populated array used for downtime, comments, and worker jobs
- iobroker - I/O broker library for multiplexing between running tasks and the master nagios process.
- iocache - I/O caching libary for bulk-reading requests and parsing them
- kvvec - key/value library for parsing requests and building responses
- nsock - socket library for connecting to and communicating through the qh socket
- nspath - general purpose path library for converting between relative and absolute paths
- nsutils - small library with worker related utilities
- pqueue - pqueue library written by Volkan Yazici
- runcmd - for spawning and reaping commands
- skiplist - skiplist library used within Nagios Core
- squeue - for maintaining a queue of the running job's timeouts
- worker - for utils and stuff nifty to have if you're a worker
-
Documentation:
Documentation of Nagios Core internals is now provided as part of the source distribution. To create an HTML version of this documentation run 'make dox' from the root of the source distribution tree. The doxygen utilities must be installed to make this documentation.
-
Tests:
A much more complete test suite is now incuded with the Nagios Core source distribution.
-
RPM Spec File:
The RPM spec file has been completely overhauled to support more current standards.
-
Deprecated Features:
- Extended Host and Service Information - The hostextinfo and serviceextinfo objects are now deprecated and should not be used. Support for them will be removed in a future version. The same information specified in the hostextinfo and serviceextinfo objects can be specified in the host and service object respectively.
- -x/--dont-verify-paths command line option (Don't check for circular object paths) - Because configuration checking is now so much faster, the option to skip checking for circular object paths has been deprecated.
- The following configuration variables have been deprecated:check_result_reaper_frequency, max_check_result_reaper_time, sleep_time,external_command_buffer_slots, command_check_interval
-
Obsoleted Features:
- Failure Prediction - As noted above, the failure_prediction_enabled flag has been removed from both host and service object definitions. Failure predition was never fully implemented and would require breaking the paradigm that Nagios Core knows nothing about the performance data returned by plugins. Failure prediction is much more approprately handled by an add-on than by Nagios Core.
- -o/--dont-verify-objects command line option - This option, while accepted in Nagios Core 3, has neither been advertized nor has had any effect for quite some time. The option has been removed in Nagios Core 4.
- Embedded Perl - Embedded Perl has historically been the least tested and the most problem prone part of Nagios Core. A significant part of the issue is that there are so many versions of Perl available. The performance enhancements provided by the new worker process architecture make up for any performance loss due to the removal of embeddd Perl. In addition, the worker process architecture makes possible the implementation of a special purpose worker to persistently load and run Perl plugins. The following configuration variables that were related to embedded Perl have been obsoleted: use_embedded_perl_implicitly, enable_embedded_perl, p1_file.
-
Miscellaneous:
- Object IDs - Primarily only of interest to developers, all of the first-class objects now have object IDs. First-class objects are timeperiod, command, contact, host, service, escalations, dependencies and all kinds of groups. Object IDs are not persistent and are recreated on each restart.
下载:http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.0.0.tar.gz
相关推荐
企业级部署Nagios监控系统,需要遵循一系列最佳实践,以确保监控系统的高效性和可靠性。 首先,我们需要理解使用Nagios的必要性。随着IT系统的日益复杂化,管理和维护成本随之上升。因此,需要减少管理成本,优化...
Nagios是一款开源的网络监控系统,用于监测主机、服务和网络状态,确保系统的稳定运行。它具有良好的稳定性、强大的功能,被广泛应用于各种规模的企业和组织。Nagios提供了主动模式和被动模式两种监控方式。 主动...
Nagios是一款开源的免费网络监视工具,其功能强大,灵活性强。能有效监控Windows、Linux和 Unix的主机状态,交换机、路由器等网络设置,打印机等。在系统或服务状态异常时发出邮件或短 信报警第一时间通知网站...
做一名运维工程师,监控恐怕是日常生活中必不可少的活了,在企业中的监控,大多是用开源软件来实现的,(为什么要用开源?省钱呗..呵呵) 而且开源软件也有着非常优秀的表现,其中著名的有cacti,nagios,ntop,Ganglia...
Nagios 是一种开源的网络监控系统,可用于监控网络设备、服务器和应用程序。它提供了强大的监控和报警功能,使网络管理员能够实时了解系统的状态并及时采取措施。 Nagios 具有以下主要功能: 监控服务:Nagios 可以...
Nagios是一款开源的网络监控系统,能够实时监控网络服务、服务器、网络设备等,并在出现问题时发出警报,确保业务的连续性和稳定性。 本书详细介绍了Nagios的基本概念、安装配置、监控对象的定义、插件的使用、报警...
将Cacti、Nagios和Ntop三者整合在一起,可以构建一套全面的企业级监控系统,该系统不仅能够监控网络流量、主机资源,还能及时发出告警通知,并且具备实时流量分析的能力。 - **整合优势**: - **全面覆盖**:Cacti...
Nagios是一款强大的网络监视系统,它能够实时监控网络服务的状态,及时发现并通知系统管理员潜在的问题。在本文中,我们将深入探讨如何使用Nagios来监控Redis和MySQL这两种广泛应用的数据库服务。 首先,让我们关注...
将cacti、nagios和ntop三种工具整合使用,可以构建一套功能完备的企业级监控系统,这种组合不仅能够提供详细的网络流量分析和图形化的数据展示,还能够实现主动的故障检测和预警,大大提高了系统的可靠性和稳定性。...
### Nagios中文完整版知识点详解 #### 一、Nagios概述 - **定义与功能:** - **Nagios**是一款强大的开源系统...无论是对于个人用户还是企业用户而言,掌握Nagios的使用方法都能够极大地提升系统的可靠性和稳定性。
### 企业级开源监控软件 cacti nagios ntop 整合 #### 一、Cacti 的简介 网络管理是系统管理员工作中不可或缺的一部分,尤其是针对主机负载、网络流量等关键指标的监控尤为重要。早期的开源网络管理软件中,MRTG ...
nagios系统监控实践,nagios告警在大数据领域用得比较多
Nagios是一款广泛使用的开源监控系统,用于监视网络服务、主机以及各种应用程序的状态。在日志监控方面,虽然Nagios自带了check_logfile插件,但它的功能相对有限。为了更有效地进行日志检查,我们可以选择使用...
Nagios 是一个功能强大的监控系统,能够监控各种设备和服务的状态。然而,在 Windows 平台上使用 Nagios 需要借助 NSClient++ 插件。本文将详细介绍 Nagios 监控 Windows 主机的配置和应用,包括 NSClient++ 的安装...
Nagios 监控软件搭建部署 Nagios 是一款功能强大、灵活性强的开源网络及服务监控工具,...Nagios 监控软件是一款功能强大、灵活性强的开源网络及服务监控工具,适合中小型企业应用,可以满足企业对监控系统的需求。
总结来说,Nagios与Oracle结合的监控方案能够为大型企业或复杂的IT环境提供一个全面、可靠的监控系统。通过上述步骤的安装和配置,可以实现对关键系统组件的实时监控,并通过Cacti提供图形化数据展示,通过Nagios的...
**分布式监控系统集成:Ganglia与Nagios** ...通过集成Ganglia和Nagios,企业能够构建出一套强大而全面的分布式监控系统,确保云应用平台的稳定运行,及时发现并处理潜在问题,从而提高整体运维效率。
SMG通过多年的实践,从定制开发监控系统、采购商用监控系统,再到部署开源监控系统,最终形成了基于Centreon+Nagios+Nagvis的分布式IT统一监控平台。 Centreon是一个开源的监控系统,主要弥补了Nagios缺乏配置管理...
Nagios系统监控实践(第2版) Nagios系统监控实践(第2版)