トップ 差分 一覧 ソース 検索 ヘルプ PDF RSS ログイン

CentOS-6.5 zabbix-2.4 演習

演習概要

事前作業

マシン要件

  • CPU 2コア
  • メモリ 2G
  • HDD 20G 以上
  • HDD 容量は追加可能 (CentOS-6 標準インストールでは LVM のため)

環境要件

  • インターネット接続、最低でも(DNS+HTTP+NTP)
  • http-proxy でも可

CentOS-6 インストール

  • クライアントまたはサーバ
  • 時間帯: Asia/Tokyo
  • ネットワーク接続
  • NTP 設定 (時刻同期)

NTP 同期確認

[root@localhost nonaka]# ntpq -p
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*192.168.27.51   210.154.103.130  4 u   48  128  377    2.596  -18.189   4.067
 LOCAL(0)        .LOCL.           5 l  67m   64    0    0.000    0.000   0.000
  • 頭に "*" があることを確認する。 --> NTP が同期している。
NTP
Network Time Protocol

対外接続確認

[root@localhost nonaka]# curl http://www.yahoo.co.jp/ 2>&1 | grep -i '<title>'
<title>Yahoo! JAPAN</title>
  • Yahoo! のトップページが取得できることを確認

作業予定

OS更新

CentOS 更新

# yum check-update
  • 更新実行
# yum update
  • yum キャッシュ 消去
# yum clean all
  • 更新RPM再確認
# yum check-update

OS 追加設定

CentOS GUI 停止

  • GUI 画面の gnome を停止し、文字ベースのコンソールを利用する。
  • GUI 画面描画に CPU やメモリなどのリソースを使用する。
  • システム安定化
  • /etc/inittab
  • 修正前
  • 修正後
  • diff
[root@localhost nonaka]# diff -u /etc/inittab.2015092401 /etc/inittab
--- /etc/inittab.2015092401    2015-09-24 12:05:11.272999779 +0900
+++ /etc/inittab       2015-09-23 01:47:13.000000000 +0900
@@ -23,4 +23,4 @@
 #   5 - X11
 #   6 - reboot (Do NOT set initdefault to this)
 #
-id:5:initdefault:
+id:3:initdefault:
  • (参考) 一時的に GUI を使用するには startx を実行する。GUI で「セッション終了」を行うと文字ベースに戻る。Oracle-Installer や IBM RAID-Manager, IBM Storage-Manager で必要。
  • (参考) コンソール画面文字数増加 /boot/grub/grub.conf kernel vga=0x317

自動起動停止

  • 自動起動内容確認
# chkconfig --list | grep :on
  • 自動起動停止
chkconfig NetworkManager off
chkconfig pcscd off
chkconfig iscsid off
chkconfig scsid off
chkconfig fcoe off
chkconfig bluetooth off
chkconfig OpenCT off
  • 自動起動開始
chkconfig sshd on
  • 自動起動内容確認
# chkconfig --list | grep :on

iptables 設定追加

[root@localhost nonaka]# diff -u /etc/sysconfig/iptables.2015092401 /etc/sysconfig/iptables
--- /etc/sysconfig/iptables.2015092401  2015-09-24 15:40:52.894228542 +0900
+++ /etc/sysconfig/iptables     2015-09-24 15:43:16.749226562 +0900
@@ -8,6 +8,9 @@
 -A INPUT -p icmp -j ACCEPT
 -A INPUT -i lo -j ACCEPT
 -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
+-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
+-A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT
+-A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT
 -A INPUT -j REJECT --reject-with icmp-host-prohibited
 -A FORWARD -j REJECT --reject-with icmp-host-prohibited
 COMMIT
  • 80番ポートの HTTPzabbix で使用する 10050+10051 ポートへの接続を許可する。

zabbix インストール

zabbix レポジトリ登録

[root@localhost nonaka]# yum -q search zabbix
Warning: No matches found for: zabbix
  • レポジトリ登録
[root@localhost nonaka]# rpm -iv http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Retrieving http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
warning: /var/tmp/rpm-tmp.fMJhL3: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
Preparing packages for installation...
zabbix-release-2.4-1.el6
  • zabbix インストール可能を確認
[root@localhost nonaka]# yum -q search zabbix
==================== N/S Matched: zabbix ======================
zabbix-agent.x86_64 : Zabbix Agent
zabbix-get.x86_64 : Zabbix Get
zabbix-java-gateway.x86_64 : Zabbix java gateway
...(以下略)...

zabbix インストール

  • yum インストール実行
[root@localhost nonaka]# yum install zabbix-agent zabbix-server-pgsql zabbix-web-pgsql zabbix-web-japanese postgresql-server
Loaded plugins: fastestmirror, refresh-packagekit, security
Setting up Install Process
... 
  • インストール内容確認
Total download size: 17 M
Installed size: 64 M
Is this ok [y/N]: y
  • 途中でRPM署名確認
warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
Importing GPG key 0x79EA5ED4:
 Userid : Zabbix SIA <packager@zabbix.com>
 Package: zabbix-release-2.4-1.el6.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
Is this ok [y/N]: y
  • yum install 結果
Installed:
 zabbix-agent.x86_64 0:2.4.6-1.el6  zabbix-server-pgsql.x86_64 0:2.4.6-1.el6  zabbix-web-japanese.noarch 0:2.4.6-1.el6  zabbix-web-pgsql.noarch 0:2.4.6-1.el6  postgresql-server.x86_64 0:8.4.20-3.el6_6

Dependency Installed:
 OpenIPMI-libs.x86_64 0:2.0.16-14.el6                   apr.x86_64 0:1.3.9-5.el6_2                           apr-util.x86_64 0:1.3.9-3.el6_0.1
 apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1                 fping.x86_64 0:2.4b2-16.el6                          httpd.x86_64 0:2.2.15-47.el6.centos
 httpd-tools.x86_64 0:2.2.15-47.el6.centos              iksemel.x86_64 0:1.4-2.el6                           libXpm.x86_64 0:3.5.10-2.el6
 lm_sensors-libs.x86_64 0:3.1.1-17.el6                  mailcap.noarch 0:2.1.31-2.el6                        net-snmp.x86_64 1:5.5-54.el6_7.1
 net-snmp-libs.x86_64 1:5.5-54.el6_7.1                  php.x86_64 0:5.3.3-46.el6_6                          php-bcmath.x86_64 0:5.3.3-46.el6_6
 php-cli.x86_64 0:5.3.3-46.el6_6                        php-common.x86_64 0:5.3.3-46.el6_6                   php-gd.x86_64 0:5.3.3-46.el6_6
 php-mbstring.x86_64 0:5.3.3-46.el6_6                   php-pdo.x86_64 0:5.3.3-46.el6_6                      php-pgsql.x86_64 0:5.3.3-46.el6_6
 php-xml.x86_64 0:5.3.3-46.el6_6                        postgresql-libs.x86_64 0:8.4.20-3.el6_6              unixODBC.x86_64 0:2.2.14-14.el6
 vlgothic-p-fonts.noarch 0:20091202-2.el6               zabbix.x86_64 0:2.4.6-1.el6                          zabbix-server.x86_64 0:2.4.6-1.el6
 zabbix-web.noarch 0:2.4.6-1.el6                        postgresql.x86_64 0:8.4.20-3.el6_6

Complete!

各種関連ソフト設定

PostgreSQL 設定

  • 最低限
  • 初期データ準備
[root@localhost nonaka]# service postgresql initdb
Initializing database:                                     [  OK  ]
  • zabbix からの接続許可追加 /var/lib/pgsql/data/pg_hba.conf
local  zabbix     zabbix                              md5
  • 起動
[root@localhost nonaka]# service postgresql start
Starting postgresql service:                               [  OK  ]
  • ユーザー追加
# su -l postgres
$ psql
psql> create user nonaka with superuser;
psql> create user zabbix with nosuperuser;
  • ユーザー確認
psql> \du
  • データベース作成
psql> CREATE DATABASE zabbix WITH TEMPLATE=template0 OWNER=zabbix ENCODING='UTF8' LC_COLLATE='ja_JP.UTF-8' LC_CTYPE='ja_JP.UTF-8';
  • データベース確認
psql> \l
  • psql SQL ヘルプ表示
psql> \h
psql> \h create table
psql> \h create database
psql> \h create user
psql> \h select
  • psql コマンドヘルプ表示
psql> \?
  • psql 終了
psql> \q
  • postgresql-server の標準インストールでは localhost 接続のみ。パスワードは必要ない。
  • ネットワーク経由で db 接続する場合は pg_hba.conf に接続許可を追加することと、パスワードを設定する。
  • 参考例1 /var/lib/pgsql/data/postgresql.conf PosgreSQL がネットワーク接続するよう設定する。
listen_addresses = '*'
  • 参考例2 /var/lib/pgsql/data/pg_hba.conf 認証方法を追加設定する。
# host       DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTIONS]
# hostssl    DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTIONS]
# hostnossl  DATABASE  USER  CIDR-ADDRESS  METHOD  [OPTIONS]
host  all  all  192.168.123.0/24  md5
  • 参考例3 psql ユーザーパスワード設定
alter user nonaka with password 'abcdef123456';

httpd 設定

  • 最低限 httpd.conf だが、長い
  • ファイル配置先 /etc/httpd/conf/httpd.conf
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 60
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15
StartServers       8
MinSpareServers    5
MaxSpareServers   20
ServerLimit      256
MaxClients       256
MaxRequestsPerChild  4000
Listen 80

LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
#LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
#LoadModule ldap_module modules/mod_ldap.so
#LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
#LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
#LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
#LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
#LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so

#LoadModule asis_module modules/mod_asis.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule cern_meta_module modules/mod_cern_meta.so
#LoadModule cgid_module modules/mod_cgid.so
#LoadModule dbd_module modules/mod_dbd.so
#LoadModule dumpio_module modules/mod_dumpio.so
#LoadModule filter_module modules/mod_filter.so
#LoadModule ident_module modules/mod_ident.so
#LoadModule log_forensic_module modules/mod_log_forensic.so
#LoadModule unique_id_module modules/mod_unique_id.so

ExtendedStatus On
User apache
Group apache

ServerAdmin root@localhost
ServerName www.example.com:80
UseCanonicalName Off
DocumentRoot "/var/www/html"
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>
<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
DirectoryIndex index.html
AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain
MIMEMagicFile conf/magic
HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D %v %X" resp
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log resp
# log rotatation at 5:00
CustomLog "| /usr/sbin/rotatelogs /etc/httpd/logs/httpd-ac%Y%m%d.log 86400 +240" resp
ServerSignature On

Alias /icons/ "/var/www/icons/"
<Directory "/var/www/icons">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*

AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif /core

AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^

DefaultIcon /icons/unknown.gif
#AddDescription "GZIP compressed document" .gz
#AddDescription "tar archive" .tar
#AddDescription "GZIP compressed tar archive" .tgz
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
AddType application/x-tar .tgz
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
#AddHandler cgi-script .cgi
#AddHandler send-as-is asis
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
Alias /error/ "/var/www/error/"
<Directory "/var/www/error">
    AllowOverride None
    Options IncludesNoExec
    AddOutputFilter Includes html
    AddHandler type-map var
    Order allow,deny
    Allow from all
    LanguagePriority en es de fr
    ForceLanguagePriority Prefer Fallback
</Directory>
#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
#    ErrorDocument 410 /error/HTTP_GONE.html.var
#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Include conf/internal.conf
</Location>

<Location /server-info>
    SetHandler server-info
    Order deny,allow
    Deny from all
    Include conf/internal.conf
</Location>

#NameVirtualHost *:80
#<VirtualHost *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>
  • httpd 設定確認
[root@localhost conf]# service httpd configtest
Syntax OK
  • httpd 起動
[root@localhost conf]# service httpd start
Starting httpd:                                            [  OK  ]
  • 自動起動有効化
[root@localhost conf]# chkconfig --list httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
[root@localhost conf]# chkconfig httpd on
[root@localhost conf]# chkconfig --list httpd
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off

zabbix 設定

zabbixPostgreSQL 設定

  • 作成した zabbix データベースにテーブル構造、初期データ、画像データを登録する。
# su -l postgres
$ psql zabbix

Linux zabbix-server 設定

Linux zabbix-agent 設定

PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=10
Server=172.22.17.184
ServerActive=172.22.17.184
Hostname=webo13
UserParameter=tomcat.threads,grep Threads /proc/`cat /var/run/tomcat6.pid`/status | cut -d: -f2 | cut -c2-
UserParameter=httpd.access,/usr/bin/curl --silent 'http://localhost/server-status?auto' | /bin/grep 'Total Accesses:' | /bin/sed 's/Total Accesses: //;'
UserParameter=httpd.busyworkers,/usr/bin/curl --silent 'http://localhost/server-status?auto' | /bin/grep 'BusyWorkers:' | /bin/sed 's/BusyWorkers: //;'
UserParameter=httpd.idleworkers,/usr/bin/curl --silent 'http://localhost/server-status?auto' | /bin/grep 'IdleWorkers:' | /bin/sed 's/IdleWorkers: //;'
UserParameter=httpd.cpuload,/usr/bin/curl --silent 'http://localhost/server-status?auto' | /bin/grep 'CPULoad:' | /bin/sed 's/CPULoad: //;'
UserParameter=httpd.totalkb,/usr/bin/curl --silent 'http://localhost/server-status?auto' | /bin/grep 'Total kBytes:' | /bin/sed 's/Total kBytes: //;'
UserParameter=system.fd.open,awk '{ print $1-$2 }' /proc/sys/fs/file-nr
UserParameter=tomcat5.Space0Capacity,/usr/dinos/bin/zabbix_jstat.pl tomcat --Space0Capacity
UserParameter=tomcat5.Space1Capacity,/usr/dinos/bin/zabbix_jstat.pl tomcat --Space1Capacity
UserParameter=tomcat5.Space0Used,/usr/dinos/bin/zabbix_jstat.pl tomcat --Space0Used
UserParameter=tomcat5.Space1Used,/usr/dinos/bin/zabbix_jstat.pl tomcat --Space1Used
UserParameter=tomcat5.EdenCapacity,/usr/dinos/bin/zabbix_jstat.pl tomcat --EdenCapacity
UserParameter=tomcat5.EdenUsed,/usr/dinos/bin/zabbix_jstat.pl tomcat --EdenUsed
UserParameter=tomcat5.OldCapacity,/usr/dinos/bin/zabbix_jstat.pl tomcat --OldCapacity
UserParameter=tomcat5.OldUsed,/usr/dinos/bin/zabbix_jstat.pl tomcat --OldUsed
UserParameter=tomcat5.PermanentCapacity,/usr/dinos/bin/zabbix_jstat.pl tomcat --PermanentCapacity
UserParameter=tomcat5.PermanentUsed,/usr/dinos/bin/zabbix_jstat.pl tomcat --PermanentUsed
UserParameter=tomcat5.YoungGC,/usr/dinos/bin/zabbix_jstat.pl tomcat --YoungGC
UserParameter=tomcat5.YoungGCTime,/usr/dinos/bin/zabbix_jstat.pl tomcat --YoungGCTime
UserParameter=tomcat5.FullGC,/usr/dinos/bin/zabbix_jstat.pl tomcat --FullGC
UserParameter=tomcat5.FullGCTime,/usr/dinos/bin/zabbix_jstat.pl tomcat --FullGCTime
UserParameter=tomcat5.GCTime,/usr/dinos/bin/zabbix_jstat.pl tomcat --GCTime
UserParameter=tomcat5.file-nr,/usr/bin/sudo /usr/dinos/bin/zabbix_tomcat5_file-nr.sh

Windows zabbix-agent 設定

Server=172.22.17.184
Hostname=vcenter11_psp
StartAgents=5
DebugLevel=4
LogFile=C:\Program Files\zabbix\zabbix_agentd.log
LogFileSize=10
Timeout=10
  • zabbix-server は 172.22.17.184 からのみに応答する。
  • ログファイルが 10M に達したらローテーション