apoteketse.com

100円・・・

$1 = 100円・・・一時100円割った様子。
世界経済かなりボロボロ・・・?
アイスランド国家破産?。。。昔アルゼンチン辺りでもあったか?
ちょっと面白い世の中!?
今んとこ予測つかないってことで、いろいろ試せる世の中になりそう?
まぁ麻生さんも解散総選挙どころじゃなくて良かったんでないの?

で、今日はひとまずNagios 、Cactiのセッティング完了。
結局昨日は夜中までごにょごにょやってみた。。;

そういうわけで、ちょっと注意事項を書き留める・・・
CentOS 5.2 + Nagios 2.12+他pluginだのなんだの必要なもの。
インストールは、yum なのでさすがに楽チン。

ただ、ちょっと一度やったってこともあり、油断した様子・・・。
いきなりいろいろ設定ファイル分けたのもちょっと間違いに気付くのに遅れたし。

まず最初は、デフォルトで、
nagios.cfg+localhost.cfg+commands.cfg+resource.cfg+cgi.cfg
辺りでさくっと動かしましょう。。>俺

その後、localhost.cfg あたりを参考に、超略記。

・cantacts.cfg に障害時の連絡情報。

#Generic contact
define contact{
contact_name                    nagios-admin
alias                           Nagios Admin
service_notification_period     24×7
host_notification_period        24×7
service_notification_options    w,u,c,r
host_notification_options       d,r
service_notification_commands   notify-by-email
host_notification_commands      host-notify-by-email
email                          alert@example.com
}
# CONTACT GROUPS
define contactgroup{
contactgroup_name       admins
alias                   Nagios Administrators
members                 nagios-admin
}

・hosts.cfg にホスト+グループ設定
(サーバー数多くてグループも別ファイルにしてあったりする。もっと細かく分けるのが良いかも・・)

# Generic Hosts template

define host{
name                            generic-host
notifications_enabled           1
event_handler_enabled           1
flap_detection_enabled          1
failure_prediction_enabled      1
process_perf_data               1
retain_status_information       1
retain_nonstatus_information    1
notification_period             24×7
register                        0
}

define host{
name                            linux-server
use                             generic-host
check_period                    24×7
max_check_attempts              10
check_command                   check-host-alive
notification_period             24×7
notification_interval           15
notification_options            d,u,r
contact_groups                  admins
register                        0
}
#check hosts
define host{
use                     linux-server
host_name               rt
alias                   rt
address                 IPAddress1
}
define host{
use                     linux-server
host_name               dns
alias                   dns
address                 IPAddress2
}

# ‘net1′ host group definition
define hostgroup{
hostgroup_name  network1
alias           net1
members         rt,dns
}

・timeperiods.cfg にチェック用の時間設定。

#当然all time!
define timeperiod{
timeperiod_name 24×7
alias           24 Hours A Day, 7 Days A Week
sunday          00:00-24:00
monday          00:00-24:00
tuesday         00:00-24:00
wednesday       00:00-24:00
thursday        00:00-24:00
friday          00:00-24:00
saturday        00:00-24:00
}

・service.cfg にチェックするサービスの設定。

#Generic
define service{
name                            generic-service
active_checks_enabled           1
passive_checks_enabled          1
parallelize_check               1
obsess_over_service             1
check_freshness                 0
notifications_enabled           1
event_handler_enabled           1
flap_detection_enabled          1
failure_prediction_enabled      1
process_perf_data               1
retain_status_information       1
retain_nonstatus_information    1
is_volatile                     0
register                        0
}

define service{
name                            local-service
use                             generic-service
check_period                    24×7
max_check_attempts              5
normal_check_interval           5
retry_check_interval            1
contact_groups                  admins
notification_options            w,u,c,r
notification_interval           15
notification_period             24×7
register                        0
}
# Define a service to “ping”,”httpd” the remote machine
##for remote
define service{
use                             local-service
host_name                       rt,dns
service_description             PING
check_command                   check_ping!200.0,30%!500.0,60%
}
define service{
use                             local-service
host_name                       rt,dns
service_description             HTTP
check_command                   check_http
}

#for local check
define service{
use                             local-service
host_name                       dns1
service_description             Root Partition
check_command                   check_local_disk!20%!10%!/
}
define service{
use                             local-service
host_name                       dns
service_description             Total Processes
check_command                   check_local_procs!250!400!RSZDT
}
define service{
use                             local-service
host_name                       dns
service_description             Current Load
check_command                   check_local_load!5.0,4.0,3.0!10.0,6.0,4.0
}

で、適宜 nagios.cfg で読み込む。

あとは変わったサービス使わなかったので、ひとまず cgi.cfg、commands.cfg 、resource.cfg とかは極端にいじらず。
サーバー数とかネットワーク数が複数あったってのもあるので、ホストグループをもうちょいこまぁく分けて見たけど・・・分けても結構しんどい。
あとは絵的に表示させるのにOSごとの設定ファイルも用意してぇとさらに細かく出来るけどひとまず、こういうところでどうでしょう。。

もうちょい表とかにして設定内容をうまく書いてる方もいるので、参考にしましょう。
あとはマニュアル+ソースミロ。。

というtest。

あと、
Yahoo!プレミアム・・・12月から値段が上がるって。パワーアップらしいけど。
出来れば、Yahoo!無線LANスポット あたり”ただ”にしてほしいかなぁ・・・。
増量、割引が目立つけど、見た目あまりうれしくないかも?
ただ、オークション面の増量はありか。何気にオークションはいざという時に・・・
あとはどの程度影響出てくるかか。
もうちょい無料サービス使うようにするか。

ノーベル物理学賞、化学賞。
なんと日本人受賞。むむ。。
中身は確かに細かくわからんが、理系離れの歯止めになると面白い。
でも賞獲られた方々は結構上の年齢なのよね。。さてさて。

今日あたりからタグクラウド開始・・・最初に変換してみたら・・・タグ蔵独活。

[特価広告]
東芝 地上デジタルチューナー内蔵ハードディスクレコーダー D-H320
35,800円!

Leave a Reply

Dansette