יום ראשון, 16 ביוני 2013

Zabbix configuration

1. Install Zabbix Agent on Cent-OS 6.X
cd /etc/yum.repos.d/ ; wget "http://download.opensuse.org/repositories/home:/ericgearhart:/zabbix/CentOS_CentOS-6/home:ericgearhart:zabbix.repo"
yum install zabbix-agent -y
chkconfig --add zabbix-agentd
chkconfig zabbix-agentd on
vi /usr/local/etc/zabbix_agentd.conf
service zabbix-agentd start

* Update CLI - Install Zabbix Agent:
# rpm -ivh http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
# yum install zabbix-agent
# chkconfig zabbix-agent on
# vi /etc/zabbix/zabbix_agentd.conf
# /etc/init.d/zabbix-agent start

MySQL Monitor:
  http://vmhacks.com/how-to-setup-mysql-enterprise-monitoring-with-zabbix/
  • [root@vmhacks.com ~]# mkdir /var/lib/zabbix
  • Right, now you can place your MySQL client connection information into this directory.  When the Zabbix agent runs the UserParameter commands, it will check the /var/lib/zabbix/.my.cnf  for a username and password.  So that means you need something like the following in your /var/lib/zabbix/.my.cnf file:
    • [client]
    • user=zabbix_boy
    • password=boyimtired


  http://blog.themilkyway.org/2013/11/how-to-monitor-mysql-using-the-new-zabbix-template-app-mysql/

# mysql -uroot -p<mysql root password goes here> -e"GRANT USAGE ON *.* TO 'zabbix'@'127.0.0.1' IDENTIFIED BY '123456'";
# mysql -uroot -p<mysql root password goes here> -e"GRANT USAGE ON *.* TO 'zabbix'@'localhost' IDENTIFIED BY '123456'";
# mysql -uroot -p<mysql root password goes here> -e"flush privileges"
# mysql -uzabbix -p123456 -e"status"

Create a new /etc/zabbix/.my.cnf config file with the mysql login (created above) to be used by zabbix to connect to the mysql server for monitoring purpose.
1
2
3
4
5
6
[mysql]
user=zabbix
password=123456
[mysqladmin]
user=zabbix
password=123456
Your zabbix agent config file should already have the line "Include=/etc/zabbix/zabbix_agentd.d/" which will automatically load all config files under that folder by default (including theuserparameter_mysql.conf file). If not then you will need to do the below to load the config file.
In the main zabbix config file include the below line to enable loading of the mysql file.

Include=/etc/zabbix/zabbix_agentd.d/
Restart the zabbix agent to load the new config file.

service zabbix-agent restart

2.Set time and date on Zabbix server in the BIOS and on the OS with the command:
date MMDDhhmmYYYY
OR use "yast"

3. How to set "date.timezone" option in php.ini - Change the date.timezone value in PHP:

#vi /etc/php5/apache2/php.ini
find&change:  date.timezone = "Asia/Jerusalem"

#/etc/init.d/apache2 restart


אין תגובות:

הוסף רשומת תגובה