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.