Created
July 27, 2014 05:24
-
-
Save masayuki5160/06092a2ddfa53f349b40 to your computer and use it in GitHub Desktop.
ZABBIXサーバ構築めも
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 旧バージョン | |
rpm -ivh http://repo.zabbix.com/zabbix/2.0/rhel/6/x86_64/zabbix-release-2.0-1.el6.noarch.rpm | |
-- 安定板バージョン | |
rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm | |
参考:これでいいよ | |
http://dev.classmethod.jp/cloud/aws/zabbix2_0_9-on-amazon-linux/ | |
###################作業ログ######################## | |
sudo rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm | |
sudo yum install zabbix-server-mysql zabbix-web-mysql zabbix-web-japanese -y | |
zabbix_server -V | |
mysql -u root | |
create database zabbix character set utf8; | |
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; | |
flush privileges; | |
use zabbix; | |
source /usr/share/doc/zabbix-server-mysql-2.2.3/create/schema.sql | |
begin; | |
source /usr/share/doc/zabbix-server-mysql-2.2.3/create/images.sql | |
source /usr/share/doc/zabbix-server-mysql-2.2.3/create/data.sql | |
commit; | |
##config設定## | |
sudo vi /etc/zabbix/zabbix_server.conf | |
※ DBName, DBUser, DBPassword | |
##/etc/httpd/conf.d/zabbix.conf の修正## | |
Require all grantedをかえるのとdatetimeの設定 | |
[ec2-user@ip-10-0-0-39 ~]$ cat /etc/httpd/conf.d/zabbix.conf | |
# | |
# Zabbix monitoring system php web frontend | |
# | |
Alias /zabbix /usr/share/zabbix | |
<Directory "/usr/share/zabbix"> | |
Options FollowSymLinks | |
AllowOverride None | |
#Order allow,deny | |
#Allow from all | |
Require all granted | |
php_value max_execution_time 300 | |
php_value memory_limit 128M | |
php_value post_max_size 16M | |
php_value upload_max_filesize 2M | |
php_value max_input_time 300 | |
# php_value date.timezone Europe/Riga | |
php_value date.timezone Asia/Tokyo | |
</Directory> | |
<Directory "/usr/share/zabbix/conf"> | |
#Order deny,allow | |
#Deny from all | |
Require all denied | |
<files *.php> | |
#Order deny,allow | |
#Deny from all | |
Require all denied | |
</files> | |
</Directory> | |
<Directory "/usr/share/zabbix/api"> | |
#Order deny,allow | |
#Deny from all | |
Require all denied | |
<files *.php> | |
#Order deny,allow | |
#Deny from all | |
Require all denied | |
</files> | |
</Directory> | |
<Directory "/usr/share/zabbix/include"> | |
#Order deny,allow | |
#Deny from all | |
Require all denied | |
<files *.php> | |
#Order deny,allow | |
#Deny from all | |
Require all denied | |
</files> | |
</Directory> | |
<Directory "/usr/share/zabbix/include/classes"> | |
#Order deny,allow | |
#Deny from all | |
Require all denied | |
<files *.php> | |
#Order deny,allow | |
#Deny from all | |
Require all denied | |
</files> | |
</Directory> | |
##サーバ起動## | |
sudo service zabbix-server start | |
chkconfig zabbix-server on | |
##Webアクセス## | |
http://54.178.186.8/zabbix | |
Username: Admin | |
Password: zabbix | |
ZABBIX on AWS | |
http://matome.naver.jp/odai/2139211128918689401 | |
これがいちばんかな? | |
http://dev.classmethod.jp/cloud/aws/zabbix-with-cloudwatch/ | |
CloudWatchでとっている値をZABBIXにAPI経由で取り込んで表示させていく、という感じ! | |
つまりエージェントはいらん、てことか〜 | |
Zabbixの外部チェック機能 | |
Zabbixには自作のスクリプトを利用して、監視を行う方法があります。外部チェックと呼ばれるものです。 | |
CloudWatchにもAPIとそれを利用するSDKも用意されているので、CloudWatchから値を取得するスクリプトを作成し、Zabbixから値を参照できるようにしてみました。 | |
sudo yum install rubygems rubygem-aws-sdk.noarch | |
サンプルコード | |
https://github.com/tech-sketch/zabbix_book_sample | |
ruby のインストール | |
http://recipe.kc-cloud.jp/archives/628 | |
http://qiita.com/kenjiskywalker/items/2c29f8f532880cb81aef |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment