Last Updated on 2021年7月4日 by かんりにん
nagiosプラグイン[nagios exchenge] †
nagiosのnagios-pluginパッケージに含まれていないアドオンで
必要と思われるものをピックアップ。
おもにnaigos exchangeからダウンロード。
記事が未記入のものは、そのうちに試すつもり…
check_cpu.sh †
http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_cpu-2Esh/details
- 使用例
$ ./check_cpu.sh OK - user: 0.50, nice: 0.50, sys: 4.34, iowait: 0.50, irq: 0.50, softirq: 0.50 idle: 96.65 | 'user'=0.50 'nice'=0.50 'sys'=4.34 'softirq'=0.50 'iowait'=0.50 'irq'=0.50 'idle'=96.65
- command.cfg追加例
# 2010-11-24 exchange plugin # 'check_local_cpu' command definition define command{ command_name check_local_cpu command_line $USER1$/check_cpu.sh -w $ARG1$ -c $ARG2$ }
- ホスト別サービス定義例(localhost.cfgなど)
# Define a service to check the cpu on the local machine. define service{ use local-service ; Name of service template to use host_name testhost service_description Cpu Usage check_command check_local_cpu!80!90 }
- nagiosgraphのmap追加例
# Service type: unix-cpu # OK - user: 0.50, nice: 0.50, sys: 3.38, iowait: 0.50, irq: 0.50, softirq: 0.50 idle: 97.61' # user=0.50 nice=0.50 sys=3.38 softirq=0.50 iowait=0.50 irq=0.50 idle=97.61 /output:user: ([.0-9]+), nice: ([.0-9]+), sys: ([.0-9]+), iowait: ([.0-9]+), irq: ([.0-9]+), softirq: ([.0-9]+) idle: ([.0-9]+)/ and push @s, [ 'cpu', [ 'user', GAUGE, $1 ], [ 'nice', GAUGE, $2 ], [ 'sys', GAUGE, $3 ], [ 'softirq', GAUGE, $4 ], [ 'iowait', GAUGE, $5 ], [ 'irq', GAUGE, $6 ], [ 'idle', GAUGE, $7 ] ];
check_mem.pl †
http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux
- 使用例
$ perl check_mem.pl -u -w 90 -c 95 CRITICAL - 95.5% (1001052 kB) used!||TOTAL=1048752KB;;;; USED=1001052KB;;;; FREE=47700KB;;;; CACHES=896432KB;;;
- command.cfg追加例
# 'check_local_mem' command definition define command{ command_name check_local_mem command_line $USER1$/check_mem.pl -u -w $ARG1$ -c $ARG2$ }
- ホスト別サービス定義例(localhost.cfgなど)
# Define a service to check the memory on the local machine. define service{ use local-service ; Name of service template to use host_name testhost service_description Memory Usage check_command check_local_mem!80!95 }
check_apachestatus †
http://exchange.nagios.org/directory/Plugins/Web-Servers/Apache/check_apachestatus/details
check_postfix †
http://exchange.nagios.org/directory/Plugins/Email-and-Groupware/Postfix/check_postfix/details
check_postfix_queue †
check_mysql_count †
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysql_count/details
check_mysql †
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysql/details
check_mysqld †
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysqld/details
check_mysql_health †
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysql_health/details
check_mysql_status †
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysql_status/details
check_url †
http://exchange.nagios.org/directory/Plugins/Websites%2C-Forms-and-Transactions/check_url/details
- 使用例
$ perl check_url.pl http://www.yahoo.co.jp/ OK: 200 OK
check_http_header †
check_ssl_cert †
http://exchange.nagios.org/directory/Plugins/Network-Protocols/HTTP/check_ssl_cert/details