harumaki.net

インフラ屋の覚書や、ラーメン食べある記とか。

GNU/Linux infra nagios 運用

nagios​/plugin​/nagios exchange[メモ]

投稿日:2010年11月25日

Last Updated on 2021年7月4日 by かんりにん

 
[pukiwiki]

*nagiosプラグイン[nagios exchenge] [#b87d3de8]

nagiosのnagios-pluginパッケージに含まれていないアドオンで
必要と思われるものをピックアップ。
おもにnaigos exchangeからダウンロード。
記事が未記入のものは、そのうちに試すつもり…

**check_cpu.sh [#da146aff]
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 [#fcd737be]
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 [#w7a23f47]
http://exchange.nagios.org/directory/Plugins/Web-Servers/Apache/check_apachestatus/details

**check_postfix [#i74b1958]
http://exchange.nagios.org/directory/Plugins/Email-and-Groupware/Postfix/check_postfix/details

**check_postfix_queue [#abe906d5]

**check_mysql_count [#ce14a179]
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysql_count/details

**check_mysql [#se155f38]
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysql/details

**check_mysqld [#dfd92699]
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysqld/details

**check_mysql_health [#dd6d4d77]
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysql_health/details

**check_mysql_status [#oa9c55f4]
http://exchange.nagios.org/directory/Plugins/Databases/MySQL/check_mysql_status/details

**check_url [#kb0810c8]
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 [#idc19d36]
http://exchange.nagios.org/directory/Plugins/Websites%2C-Forms-and-Transactions/check_http_header/details

**check_ssl_cert [#i64a64c9]
http://exchange.nagios.org/directory/Plugins/Network-Protocols/HTTP/check_ssl_cert/details

[/pukiwiki]
 

 

-GNU/Linux, infra, nagios, 運用
-

執筆者:


comment

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA


関連記事

no image

[自分メモ]Linux/BSD tarで固めたファイルの伸長サイズを確認

たま~に必要になるけど、すぐ忘れちゃうのでメモ。 tar で固めたファイルを展開せずに、実際のサイズを確認したいときは オプションtfに”-v(verpose)”をつければ確認 …

[nagios]nrpe.cfgのパラメーター一覧

RPM版nrpeでインストールされるnrpe.cfgのパラメーター一覧と説明書き。デフォルトの設定値つき。 結構適当な解釈をしちゃってるかもなので、ご指摘、ツッコミお待ちしておりますw log_fac …

no image

postfix SMTP-auth + TLSの実装

[pukiwiki] &topicpath;   **▼smtp-auth + TLSの実装 [#j312771a]  別項で記載したUNIXパスワードでのsmtp-auth実装に  暗号化 …

no image

[メモ]CMakeインストール

[pukiwiki] MySQL-5.5.9をインストールしようとしたら、configureが見当たらず CMakeに変更されていたので、ひとまずMySQL用にインストール。 -CMakeの公式サイト …

no image

[メモ]sudo su -設定

たまにド忘れするのでメモ。 サーバー構築時にパス無しでsudo su -したいとき用に。 1)wheelグループへ追加 # vi /etc/group または # vigr wheelグループへsud …

宅麺