# duangr-nagios-plugin **Repository Path**: duangr/duangr-nagios-plugin ## Basic Information - **Project Name**: duangr-nagios-plugin - **Description**: 定制nagios的插件 - **Primary Language**: Shell - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 2 - **Forks**: 0 - **Created**: 2013-12-16 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README #duangr-nagios-plugin Develop a custom for nagios plug-ins First of all, please see [Nagios Install Guide][183160]. [183160]: http://my.oschina.net/duangr/blog/183160 "duangr's blog" # How to deploy 1. checkout libexec/* 2. put them under your host ${nagios_home}/libexec # Features ##check_netstat Checks all network connects and generates WARNING or CRITICAL states if the specified metric is outside the required threshold ranges. The metric defaults to number of connects. Search filters can be applied to limit the connects to check.
check_netstat 1.0 @duangr
Checks all network connects and generates WARNING or CRITICAL states if the specified
metric is outside the required threshold ranges. The metric defaults to number
of connects. Search filters can be applied to limit the connects to check.
Usage: check_netstat -w limit -c limit [-p Port] [-s State]
Options:
-h, --help
Print detailed help screen
-V, --version
Print version information
-w
Generate warning state if metric is outside this range
-c
Generate critical state if metric is outside this range
-p
Port Num for filtering
-s
State for filtering (e.g. ESTABLISHED LISTEN TIME_WAIT)
Examples:
check_netstat -w 2 -c 4 -p 22 -s ESTABLISHED
Critical if > 4 ESTABLISHED connects with port 22
Warning if > 2 ESTABLISHED connects with port 22
check_netstat -w 2:10 -c :20 -p 80 -s ESTABLISHED
Critical if > 20 ESTABLISHED connects with port 80
Warning if < 2 or > 10 ESTABLISHED connects with port 80
check_netstat -c 1:1 -p 80 -s LISTEN
Critical if not one LISTEN connects with port 80