How to compile the Nagios plug-in (1)

Source: Internet
Author: User

Nagios pluginYou can write it on your own, so you don't need to find it online. The specific process is as follows:

The most exciting aspect of Nagios is that you can easily write your own plug-ins. You only need to understand some simple guiding principles. To manage the plug-in, Nagios generates a sub-process every time it queries the status of a service, and uses the output and exit code from the command to determine the specific status. The exit status code is described as follows:

OK-exit code 0-indicates that the service works normally.

WARNING-exit code 1-indicates that the service is in the WARNING state.

CRITICAL-Exit Code 2-indicates that the service is in a dangerous state.

UNKNOWN-exit code 3-indicates that the service is UNKNOWN.

The last status usually indicates that the plug-in cannot determine the service status. For example, an internal error may occur.

The following provides a Python sample script for checking UNIX®Average load. It assumes that more than 2.0 indicates the warning state, and more than 5.0 indicates the dangerous state. These values are hard-coded and always use the average load of the last minute.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.