*zabbix 導入 *zabbix インストール記録1 *zabbix インストール記録2 *zabbix バージョンアップ1 *zabbix 旧情報 !!!サイト !http://www.zabbix.com/ 本家 !http://www.zabbix.jp/ !!!記事 !!統合監視ツールZABBIX事始め *著者:ZABBIX-JP 寺島 広大 !第5回:ZABBIXの便利な付加機能とアラートメールの日本語化 *http://www.thinkit.co.jp/free/article/0611/19/5/ !ZABBIX-JPのyumリポジトリ利用方法 *http://www.zabbix.jp/modules/bwiki/index.php?ZABBIX-JP%A4%CEyum%A5%EA%A5%DD%A5%B8%A5%C8%A5%EA%CD%F8%CD%D1%CA%FD%CB%A1 *Red Hat Enterprise Linux 4/ CentOS 4 # rpm -ivh http://www.zabbix.jp/binaries/relatedpkgs/rhel4/i386/zabbix-jp-release-4-5.noarch.rpm *Red Hat Enterprise Linux 5 / CentOS 5 # rpm -ivh http://www.zabbix.jp/binaries/relatedpkgs/rhel5/i386/zabbix-jp-release-5-5.noarch.rpm *Red Hat Enterprise Linux 6 / CentOS 6 # rpm -ivh http://www.zabbix.jp/binaries/relatedpkgs/rhel6/i386/zabbix-jp-release-6-5.noarch.rpm **直接 rpm で http:// を指定すると、以下のエラー。なんで? curl: (22) The requested URL returned error: 404 **wget して rpm でインストール *yum レポジトリ情報をインストール後 yum search zabbix !agentd と agent との違い *What's the difference between 'zabbix agent' and 'zabbix agent (active)'? *http://www.zabbix.com/forum/archive/index.php/t-1068.html *agentd : regular check (通常チェック) **zabbix-server からの要求を受け付けて処理する *agent : active check (自発チェック) **agent が zabbix-server に接続し、情報収集が必要な項目リストを取得 **定期的に zabbix-server にデータを送信する **zabbix-server側から起動する処理がない **zabbix-server側での処理が軽減され、1.5倍から2倍 処理能力が上がる !ネットワークトラフィックの値が取れません。/ ZABBIX-JP *http://www.zabbix.jp/modules/newbb/viewtopic.php?topic_id=1030&forum=6 ""Windowsは画面上に表示されている設定名と、内部で持っているパフォーマンスカウンタのパス文字列が異なるということがあります typeperf -qx !Database growth after 2.2.1 Update / ZABBIX Forums *https://www.zabbix.com/forum/showthread.php?t=43771&highlight=housekeeper *jhenry ""Have you looked at the new housekeeper settings in 2.2? It's not controlled by the server config file anymore. Go to Administration -> General and then change the dropdown at top right to Housekeeping. You'll probably find that housekeeping is disabled or running less frequently than before and that's why the DB is growing. *和訳 ""2.2 の新しいHouseKeeper設定は確認しましたか? ""サーバ設定ファイルでは設定できなくなりました。 ""管理->一般設定を出して右上のドロップダウンメニューから「データの保存期間」に変更します。 ""データの削除設定は停止になっているか、間隔が長くなっているのでデータベースのファイルが肥大してるのでしょう。 !!!メモ !zabbix_agentd が起動しない Can't allocate shared memory for collector. [Cannot allocate memory] *共有メモリが足りない *再起動しない場合 # sysctl -w kern.ipc.shmall=32768 # sysctl -w kern.ipc.shmmax=134217728 # sysctl -w kern.ipc.semmap=256 *その他 FreeBSD のメモを参照 !Red Hat rpm レポジトリ *http://cvs.fedora.redhat.com/cgi-bin/viewcvs.cgi/rpms/zabbix/?root=extras&sortby=rev#dirlist !ポート番号 *zabbix-agent LISTENポート: 10050 *zabbix-server LISTENポート: 10051 !mysql 最適化 *7ヵ月運用 *MySQL / InnoDB *history 最適化 '''10時間!!!''' mysql> optimize table history; +----------------+----------+----------+----------+ | Table | Op | Msg_type | Msg_text | +----------------+----------+----------+----------+ | zabbix.history | optimize | status | OK | +----------------+----------+----------+----------+ 1 row in set (9 hours 48 min 17.82 sec) *history_uint 最適化 mysql> optimize table history_uint; +---------------------+----------+----------+----------+ | Table | Op | Msg_type | Msg_text | +---------------------+----------+----------+----------+ | zabbix.history_uint | optimize | status | OK | +---------------------+----------+----------+----------+ 1 row in set (55 min 20.94 sec) *analyze は秒単位で終了 !Windows に zabbix_agent をサービス登録 *zabbix_agentd.exe を準備、Win32 と x64 用がある *C:\Program Files\zabbix\zabbix_agentd.exe にコピー *zabbix_agentd.conf を準備 *C:\zabbix_agentd.conf にコピー **conf を他のディレクトリに配置しても、サービス起動時に警告が出てダメだった。 *サービス登録 zabbix_agentd.exe -i -c "C:\zabbix_agentd.conf" *サービスの管理画面から ZABBIX Agent を起動 !windows 系マシンを perf_counter で監視する場合 *typeperf で文字列を確認する。 typeperf -qx *特に Intel 製 NIC の場合 *「Intel(R)」は「Intel[R]」で登録する *「/」は「_」 *複数NICの場合の「#」は「_」 !!!参考情報 !No more flapping. Define triggers the smart way. / zabbix weblog *http://blog.zabbix.com/no-more-flapping-define-triggers-the-smart-way/1488/ * take advantage of the min() function. *(和訳) min() を使いましょう {Oracle DB1:system.cpu.load.min(5m)} > 2 *Eliminating flapping and false alarms – hysteresis. * Zabbix supports a {TRIGGER.VALUE} macro, which returns the current trigger status as an integer (0 – ok, 1 – problem) and can be used directly in trigger expressions. *(和訳) 現在のトリガの状況を整数で取得し、トリガの条件式で利用できます。 ({TRIGGER.VALUE}=0 & {Oracle DB1:system.cpu.load.last()} > 2) | ({TRIGGER.VALUE}=1 & {Oracle DB1:system.cpu.load.last()} > 1)