2015-07-17 Centos under Zabbix installation and configuration

Source: Internet
Author: User
Tags custom name

Zabbix installation Configuration
1 Installing Zabbix
Yum Install-y epel-release
Install RPM package for lamp environment Yum install-y httpd mysql mysql-libs php php-mysql mysql-server php-bcmath php-gd php-mbstring
Install Zabbix server: Yum install zabbix20 zabbix20-agent zabbix20-server zabbix20-server-mysql zabbix20-web zabbix20-web-mysql Net-snmp-devel
/etc/init.d/zabbix-server start; /etc/init.d/zabbix-agent start
/ETC/INIT.D/HTTPD start;
Modify the MySQL configuration file
VIM/ETC/MY.CNF//Modify or add the following content
[MySQL]
Default-character-set = UTF8
[Mysqld]
Character_set_server = UTF8
Start the MySQL service
/etc/init.d/mysqld start
Building libraries, importing data
Mysql-uroot-p-E "CREATE Database Zabbix"
Mysql-uroot-p--default-character-set=utf8 Zabbix </usr/share/zabbix-mysql/schema.sql
Mysql-uroot-p--default-character-set=utf8 Zabbix </usr/share/zabbix-mysql/images.sql
Mysql-uroot-p--default-character-set=utf8 Zabbix </usr/share/zabbix-mysql/data.sql
2. Web Installation Zabbix
The browser accesses the Http://ip/zabbix, and by default there is a warning message "It is not safe to rely on the system ' s timezone settings", which requires Vim/etc/php.ini to set date. Timezone= "Asia/shanghai" point next
Solve the related error message, point Retry (Vim/etc/php.ini)
Enter MySQL related information, first of all to test, if not pass, you need to debug, test pass, click Next
Name write 127.0.0.1, (can be customized) point next, click Next, finish the last point
Default Administrator account is Admin:zabbix
You will encounter an error such as "Zabbix server is not running" and need to edit/etc/zabbix/zabbix_server.conf, configure Dbuser, Dbpassword
3. Access the host you want to monitor
On the client, yum install Zabbix20-agent
vim/etc/zabbix_agentd.conf//change server= server IP; serveractive=0.0.0.0:10050; Hostname=aming (custom, but unique)
Start Client/etc/init.d/zabbix-agent start
Command-line test on the server: Zabbix_get-s client ip-p10050-k "System.hostname"
Under the Web interface, click "Configuration"--"host"--Top right corner "Create host" where host name, visible name custom, can choose groups, here default, IP addres s write client IP
Configure the Monitoring project template: Point "Templates", click Add, select Template OS Linux in the small pop-up window, then click Select, Last click Save
4. Custom templates
Zabbix comes with a lot of templates, which have many monitoring items, such as CPU, NIC, memory, process and so on. Using the system comes with a template a bit too much, so we can customize the template. Point configuration Select Templates, point to the top right corner of the Create template
Template name and visible name custom, Groups Select Templates, point save
Then we went to pick up some items to copy under the template: for example, we find template OS Linux dot items, select the items we want, then select Copy Selected to ... below. Then click Go
Group Select Templates, find our custom templates just now, click Copy
Point Configuration Select templates you can see that the new templates already has our copy items.
We can use the same method as above to customize the copy triggers (trigger), which is used to set the threshold value of the alarm, of course, we can also customize to edit it
Monitor client NIC Traffic http://www.apelearn.com/bbs/thread-8091-1-1.html
5. Configure Outgoing mail
Yum Install-y SendMail;
Mkdir-p/home/zabbix/bin
vim/home/zabbix/bin/baojing.sh//content:
#! /bin/bash
echo "$" |/bin/mail-s "$" $
chmod +x/home/zabbix/bin/baojing.sh
In the zabbix_server.conf configuration file, there are parameters Alertscriptspath and externalscripts
alertscriptspath=/home/zabbix/bin/---User-defined media types scripts
externalscripts=/home/zabbix/bin/---User-defined script for the check (item)
In order to find your script, because you just enter the name of the script in frontend, there is no path.
Create MEDIEA types: "Administration"--"Media types", click "Create Media Type" in the upper right corner where description fill "baojing" or other custom name, Type select " Script ", script" baojing.sh "and then click" Save ".
Create User: "Adimistration"-"users" in the upper right corner, select "Users", click "Create User", Alias:test1, customize name and LastName password:123456; Group Select Guest, go back to the top click Media,type Select Baojing,send to write the mailbox to send mail, click Add, Last point save
Create action: "Configuration"--actions, upper right corner "Create actions", name custom, I write "baojing" here, other default, then point to the right of "Operations" under "New" button, "Operation Type" selects "Send Message", "Send Message to" selects one or more user groups to send the message, send to users selects our previously added test1, "Send only to" Select Baojing, click Add
Last point Save
Zabbix historical record garbled problem http://caisangzi.blog.51cto.com/6387416/1313630
Garbled problem in Zabbix graphics http://www.apelearn.com/bbs/thread-8090-1-1.html
Zabbix Reference Articles
Http://www.iyunv.com/thread-22959-1-1.html
http://waringid.blog.51cto.com/65148/955939/
Http://www.linuxidc.com/Linux/2014-11/109909.htm
Custom script: http://www.linuxidc.com/Linux/2013-11/92476.htm

2015-07-17 Centos under Zabbix installation and configuration

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.