ラベル Zabbix の投稿を表示しています。 すべての投稿を表示
ラベル Zabbix の投稿を表示しています。 すべての投稿を表示

2014/05/02

頻繁に Zabbix discoverer processes more than 75% busy のイベントが発生する。

下記を実施 (zabbix2.2.3)

1. /etc/zabbix/zabbix_server.conf (/etc/zabbix/zabbix_proxy.conf)で下記を修正
前:# StartDiscoverers=1
後:StartDiscoverers=3


2. 変更&保存後、サービスを再起動。




2014/03/25

ダッシュボードの「Zabbixサーバーの起動」が「いいえ」になる

ダッシュボードの「Zabbixサーバーの起動」が「いいえ」になる。

処置
SELinuxを無効にする
/etc/sysconfig/selinux (/etc/selinux/config) で SELINUX=disabled を設定しOS再起動。

2013/11/23

Update Zabbix to 2.2.0 from 2.0.8

Update Zabbix to 2.0.6 from 2.0.3」と同様で、問題なくアップデートできた。

2013/06/04

マップのURLを target=_blank で開く

(1)[ZABBIX_WEBROOT]/js/menu.js line 449行目にコードを追加
else {
if (!is_null(this.a_config[1]) && (this.a_config[1].indexOf('javascript') == -1)
&& !(!is_null(this.a_config[2]) || this.a_config[2] == 'nosid')) {
var url = new Curl(this.a_config[1]);
this.a_config[1] = url.getUrl();
}
// ADD-S
if(this.a_config[1] && (this.a_config[1].substr(0, 4)=='ext:')) {
this.a_config[1] = this.a_config[1].substr(4);
el.setAttribute('target', '_blank');
}
// ADD-E
el.setAttribute('href', this.a_config[1]);
if (this.a_config[2] && this.a_config[2]['tw']) {
el.setAttribute('target', this.a_config[2]['tw']);
}
}

(2)MAPのURLの左にext:を加える。
例 ext:http://xxx.yyyy.co.jp/

ref. https://www.zabbix.com/forum/showthread.php?t=23898

2013/05/13

Update Zabbix to 2.0.6 from 2.0.3

1. bin
# cd /usr/local/src
# tar zxvf zabbix-2.0.6.tar.gz
# service zabbix_server stop
# cd zabbix-2.0.6
# ./configure --enable-server --enable-agent --with-mysql --with-net-snmp
         --with-libcurl # for MySQL + WEB monitoring
# make install
# service zabbix_server start

2. Web
# cd frontends/php
# cp -a . /var/www/zabbix

3. font
migu-1m-regulat.ttf を /var/www/zabbix/fonts に配備

4. 次のファイルをアップグレード前に行っていた修正を、同様に実施。
/var/www/zabbix/conf/zabbix.conf.php
/var/www/zabbix/include/defines.inc.php

以上

2012/05/25

Update Zabbix to 2.0.0 from 1.8.9

「Upgrade procedure」に従いアップグレード

http://www.zabbix.com/documentation/2.0/manual/installation/upgrade

1. bin
# cd /usr/local/src
# tar zxvf zabbix-2.0.0.tar.gz
# service zabbix_server stop
# cd zabbix-2.0.0
# ./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl # for MySQL + WEB monitoring
# make install
# mysql zabbix<upgrades/dbpatches/2.0/mysql/patch.sql    ※結構時間がかかった
# service zabbix_server start
2. Web
# cd frontends/php
# cp -a . /var/www/zabbix
3. font
migu-1m-regulat.ttf を /var/www/zabbix/fonts に配備

4. 次のファイルをアップグレード前に行っていた修正を、同様に実施。
/var/www/zabbix/conf/zabbix.conf.php
/var/www/zabbix/include/defines.inc.php

以上

追記
makeすると /usr/local/etc に .confが配備される。こちらの.confを使う様に変更。

2011/07/09

外部チェックによるプロキシ経由のWeb監視

(1)zabbixサーバの /etc/zabbix/externalscriptsにファイル web-via-proxy.shを配備する。
#! /bin/sh

# $1 HOST
# $2 URL
# $3 PROXY

http_proxy="$3" wget -T 3 --spider $2 2>/dev/null; if [ "$?" = "0" ]; then echo "1"; else echo "0"; fi
(2) セキュリティを変更する。
chmod 755 /etc/zabbix/externalscripts/web-via-proxy.sh
(3) Webコンソールでアイテムを登録する。
項目 値 説明
説明 web $1
タイプ 外部チェック
キー web-via-proxy.sh[リクエスト プロキシ] リクエストとプロキシの間は空白。

web-via-proxy.sh[http://www.yahoo.com/ proxy.hk.dom:3128]
データ型 数値(整数)

2010/10/16

メンテナンス期間中の・・・

Zabbix 1.8.3

メンテナンス期間を設定した場合
1.トリガーの「障害」は発生しない。
2.トリガーの「回復」は発生する。
3.トリガーの「障害」は発生しないため、アクションも発生しない。
4.トリガーの「回復」は発生しても、アクションの回復通知は発生しない。

2010/09/23

Linuxプロセス数監視

proc.num[name,user,state,cmdline]

name - process name
user - user name (default is all users)
state - one of all (default), run, sleep, zomb
cmdline - filter by command line

プロセス名は、PID から次のコマンドで調べる。
# cat /proc/(PID)/stat

2010/09/01

snmptrap受信設定

設定

1.snmptrapd を利用可能にするためsnmpパッケージをインストールする。
yum install net-snmp
2.ファイル/etc/snmp/snmptrapd.conf を新規作成する。コミュニティ名(public privateなど)は送信元に合わせる。
authCommunity log,execute,net private
authCommunity log,execute,net public
traphandle default /bin/bash /home/zabbix/bin/snmptrap.sh
3.snmptrap.sh を配備する。
# mkdir /home/zabbix/bin
# cp /usr/local/src/zabbix-1.8.3/misc/snmptrap/snmptrap.sh /home/zabbix/bin/snmptrap.sh
# chmod 755 /home/zabbix/bin/snmptrap.sh
4.snmptrap.sh を編集する。
# ZABBIX_SERVER="localhost";
ZABBIX_SERVER="127.0.0.1";
# ZABBIX_SENDER="~zabbix/bin/zabbix_sender";
ZABBIX_SENDER="/usr/local/bin/zabbix_sender";
5.Zabbix「ホスト」登録
名前:snmptraps
新規グループ:snmptraps
6.Zabbix「アイテム」登録
ホスト:snmptraps
説明:snmptraps
タイプ:Zabbixトラッパー
キー:snmptraps
データ型:文字列
7.snmptrapd を開始する。
service snmptrapd start

X.テスト
zabbix_sender -z localhost -p 10051 -s snmptraps -k snmptraps -o "Test"

2010/06/30

テンプレートのインポートで失敗する

現象
インポートできない。
httpd/error.logに「PHP Fatal error: ... Failed opening required 'include/classes/class.domdocument.php' ... in /var/www/html/zabbix/php/include/config.inc.php on line 62, ... 」

対処
yum install php-xml

2010/04/17

Zabbixエージェント(アクティブ)

Zabbixエージェント(アクティブ)/ Zabbix agent (active)

Winodwsイベントログやログファイルの監視に使用する。
Zabbixサーバの負荷を抑える為に他の項目を監視する場合も例外的にありえる。

※Zabbixエージェント(アクティブ)が有効に機能するために、エージェントの構成ファイルzabbix_agentd.conf で、DisableActive=0 を設定する必要がある。

2010/04/14

fpingインストール

CentOS 5.4
ダウンロードしコンパイルする。
# cd /usr/local/src
# wget http://fping.sourceforge.net/download/fping.tar.gz
# tar xvfz fping.tar.gz
# cd fping-2.4b2_to
# ./configure
# make install
# chmod 755 /usr/local/sbin/fping

2010/04/04

Zabbix 自動起動

Oracle Enterprise Linux 5
Zabbix 1.8.2
手順
(1)サイトから zabbix-1.8.2.tar.gz をダウンロード&解凍し、misc/init.d/redhat/8.0 の zabbix_server zabbix_agentd を /etc/init.d にコピーする。
(2)2箇所を修正する。
# chkconfig: - 90 10
progdir="/usr/local/sbin/"
MySQL より Zabbix Server は後で起動する必要があるため。
※mysqldの内容→ # chkconfig: - 64 36 
(3)次を実行
# chmod 755 /etc/init.d/zabbix_server
# chkconfig --add zabbix_server
# chkconfig zabbix_server on
# chmod 755 /etc/init.d/zabbix_agentd
# chkconfig --add zabbix_agentd
# chkconfig zabbix_agentd on
(4)再起動し動作を確認。
おまけ
起動スクリプト(/etc/init.d/zabbix_server /etc/init.d/zabbix_agentd)に次を追加するとステータス取得ができる。
status)
status zabbix_agentd
RETVAL=$?
;;

2010/04/03

Zabbix1.8.1 から1.8.2 へのアップデート

基本手順は「Zabbix1.8から1.8.1へのアップデート」と同じ。
ただし、「8. Zabbix GUIの初期設定 (2)インストール」で条件不足となる場合があるため、php.ini の変更が必要になる可能性がある。

2010/03/26

Zabbix日時表示フォーマットの変更

Zabbix 1.8.1
表示形式が複数あるので統一する。
形式:Y-m-d H:i:s
2010-03-26 13:25:57

修正箇所

「アイテム-最新の500件」
[zabbix php]/history.php
3箇所(415行目付近、424行目付近、551行目付近)

「アイテム-グラフ」
(調査中)

2010/03/22

Windowsテキストログ監視

Zabbix 1.8.1
アイテム
タイプ:Zabbixエージェント(アクティブ)
キー:log[file,,,]
データ型:ログ
更新間隔:1
log[file,<regexp>,<encoding>,<maxlines>,<mode>]
file – full file name
regexp – regular expression for pattern
encoding - Code Page identifier
maxlines - Maximum number of new lines per second the agent will send to Zabbix Server or Proxy. This parameter overrides the 'MaxLinesPerSecond' option in zabbix_agentd.conf
mode - one of all (default), skip (skipping processing of older data)
Parameter mode will be supported from version 2.0.
ex. log[c:\atemp\testlog1.txt]
ex. log[c:\atemp\testlog1.txt,,"UTF-8",100]
トリガー
{w23h01:log[c:\atemp\testlog1.txt].str(ERROR)}#0
*次の行に、ERRORの文字がないとトリガーの条件に一致しないため、正常状態に変わるため、アクションによる通知が必須となる。

2010/03/21

ログファイル監視

タイプ ZABBIXエージェント(アクティブ)
キー log[file<,regexp>] ex.log[/var/log/syslog], log[/var/log/syslog,error].
Make sure that the file has read permissions for user ‘zabbix’ otherwise the item status will be set to ‘unsupported’. Zabbix agent will filter entries of log file by the regexp if present.
データ型 ログ
更新間隔 1

Windowsプロセス数監視

アイテム
タイプ ZABBIXエージェント
キー proc.num[]
データ型 数値(浮動少数)
サービス登録できないプログラムの死活監視はEXEファイルの起動数をカウントする方式で行う。
ex. proc.num[explorer.exe]
トリガー
起動しているプロセスが無い場合(戻り値=0)にアラートを上げる設定は以下となる。
{{HOSTNAME}:proc.num[].last(0)}=0

Windowsサービス監視


アイテム

イプ ZABBIXエージェント
キー service_state[] <-サービス名(表示名ではない) データ型 数値(浮動少数) ex. service_state[W3SVC]
トリガー

戻り値が0以外の場合アラート
{{HOSTNAME}:service_state[SERVICE_NAME].last(0)}#0
戻り値
0 実行中
1 一時停止中
2 開始待ち
3 一時停止待ち
4 続行待ち
5 停止待ち
6 停止
7 不明
255 該当サービスなし