Play Turn Open-falcon

Source: Internet
Author: User
Tags install redis

#1
wget Https://github.com/XiaoMi/open-falcon/releases/download/0.0.5/open-falcon-0.0.5.tar.gz-O open-falcon.tar.gz
mkdir tmp
TAR-ZXVF open-falcon.tar.gz-c./tmp

Update Yum Source
cd/etc/yum.repos.d/
MV Centos-base.repo Centos-base.repo.backup
wget Http://mirrors.163.com/.help/CentOS6-Base-163.repo
Yum Makecache
Yum-y Update

Found repos.fedorapeople.org 404, and we're going to find a Kill
Grep-l repos.fedorapeople.org./*.repo

#2
Yum Install Redis-server
Yum Install Mysql-server

If you meet MySQL forgot password
#1 Add Skip-grant-tables to/ETC/MY.CNF Note: change this comment off
#2/etc/init.d/mysqld Restart
#3 Update Mysql.user Set Password=password (' 123456 ') where user= ' root ';

#3
Yum Install git*-y
git clone https://github.com/open-falcon/scripts.git
CD scripts
Mysql-h Localhost-u Root-p < Db_schema/graph-db-schema.sql
Mysql-h Localhost-u Root-p < Db_schema/dashboard-db-schema.sql
Mysql-h Localhost-u Root-p < Db_schema/portal-db-schema.sql
Mysql-h Localhost-u Root-p < Db_schema/links-db-schema.sql
Mysql-h Localhost-u Root-p < Db_schema/uic-db-schema.sql
Note: If you set the password above MySQL, you need to enter the password

#4 Install agent (this installation needs to be installed on the machine that collects the data)
Copy the falcon-agent-5.1.0.tar.gz.
PASSD 123456
SCP falcon-agent-5.1.0.tar.gz 192.168.11.199:/tmp
Mkdir/home/open-falcon
Cd/home/open-falcon
Mv/tmp/falcon-agent-5.1.0.tar.gz.
Tar zxf falcon-agent-5.1.0.tar.gz
MV Cfg.example.json Cfg.json &&./control start &&./control tail

#5 back to the server
Cd/home/open-falcon
mkdir {Agent,alarm,dashboard,fe,gateway,graph,hbs,judge,links,portal,query,sender,task,transfer}
Cd/tmp

Tar zxf falcon-agent-5.1.0.tar.gz-c. /agent
。。。

Go to each directory to start all:./control start
Reference manual ... Http://www.jianshu.com/p/a5fcd5c048f1

Issues in the deployment:
Cleaning up ...
Command/home/open-falcon/dashboard/env/bin/python-c "Import setuptools;__file__= '/home/open-falcon/dashboard/env /build/mysql-python/setup.py '; EXEC (compile (open (__file__). Read (). replace (' \ r \ n ', ' \ n '), __file__, ' exec ')) " Install--record/tmp/pip-vycjsx-record/install-record.txt--single-version-externally-managed--install-headers/ home/open-falcon/dashboard/env/include/site/python2.6 failed with error code 1 in/home/open-falcon/dashboard/env/ Build/mysql-python
Traceback (most recent):
File "./env/bin/pip", line 9, <module>
Load_entry_point (' pip==1.4.1 ', ' console_scripts ', ' Pip ') ()
File "/home/open-falcon/dashboard/env/lib/python2.6/site-packages/pip/__init__.py", line 148, in main
Return Command.main (args[1:], Options)
File "/home/open-falcon/dashboard/env/lib/python2.6/site-packages/pip/basecommand.py", line 169, in main
Text = ' \ n '. Join (Complete_log)
Unicodedecodeerror: ' ASCII ' codec can ' t decode byte 0xe9 in position 20:ordinal not in range (128)



Workaround: Add the following three lines to the py file with the error above
Import Sys
Reload (SYS)
Sys.setdefaultencoding (' Utf-8 ')


Issue: Error:command ' gcc ' failed with exit status 1
Yum groupinstall-y Development
Yum install-y zlib-dev openssl-devel sqlite-devel bzip2-devel libxslt-devel libffi-devel


#6 Handle High concurrency
1. Shard: A machine can not resist is divided into more than one machine, several people cloud is a PAAs platform, PAAs platform is easy to do the expansion, the original 300 instances now do 3,000 units, click on the page button, 10 seconds can let 3000 instances up, do 3,000 shards.


2. Queue: Sometimes there are some peaks, we do not want to be defeated by the peak, so we use the queue buffer, the system has a number of places to use the queue, such as transfer in memory to build multiple queues, alarm events using Redis to do the queue service.


3. Index: Indexes can speed up queries.


4. Current limit: The back end of the interface can not withstand pressure when the current limit.

This article from the "Development and operation of the" blog, declined to reprint!

Play Turn Open-falcon

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.