Open-falcon Installation (i)

Source: Internet
Author: User
Tags install redis
This is a creation in Article, where the information may have evolved or changed.

1, the binary package installation
2. Source code Installation

Premise: recommended to use the General account installation
1, installation Redis:yum install Redis-y
2. Install MySQL (binary mariadb package installation)
3. Initializing MySQL database and table structure

export HOME=/home/workexport WORKSPACE=$HOME/open-falconmkdir -p $WORKSPACEcd  $WORKSPACEgit clone https://github.com/open-falcon/scripts.git     cd ./scripts/mysql -h localhost -u root -p < db_schema/graph-db-schema.sqlmysql -h localhost -u root -p < db_schema/dashboard-db-schema.sqlmysql -h localhost -u root -p < db_schema/portal-db-schema.sqlmysql -h localhost -u root -p < db_schema/links-db-schema.sqlmysql -h localhost -u root -p < db_schema/uic-db-schema.sql

4. Initialize GO language Environment
Golang Package Download: https://golang.org/dl/

cd ~ && tar xf go1.4.1.linux-amd64.tar.gzecho "export HOME=/home/work" >> .bashrcecho "export GOROOT=$HOME/go" >> .bashrcecho "export GOPATH=$HOME/workspace" >> .bashrcecho "export WORKSPACE=$HOME/open-falcon" >> .bashrcecho "export PATH=$GOROOT/bin:$GOPATH/bin:$PATH" >> .bashrcsource .bashrcmkdir -p $GOPATH/src/github.com/git clone --recursive https://github.com/open-falcon/of-release.git

Note: If the Golang (CENTOS6 is 1.7 version) of the RPM package is installed, the GOROOT environment variable setting needs to be changed:

# echo "export GOROOT=/usr/lib/golang" >> .bashrc

First, the Installation Agent

cd $GOPATH/src/github.com/of-release/agentgo get ./...报错:# github.com/of-release/agent./main.go:34: undefined: g.InitLocalIps1、yum 安装go环境是1.7报错2、go二进制包安装环境版本是1.4.1依然爆这个错误

Is this teasing me?

go get ./..../control build./control pack最后一步会出一个.tar.gz包,拿去安装即可。

Agent configuration file: Based on Cfg.example.json modification

{"Debug": True, # controls the output of some debug information, the production environment is usually set to FALSE "hostname": "", # Agent collected the data sent to Transfer,endpoint is set to hostname, by default through the ' H Ostname ' Get, if configured in the configuration of hostname, with the configuration of "IP": ", # Agent and HBS Heartbeat when the IP address will be sent to Hbs,agent will automatically detect the local IP, if you do not want the agent to automatically detect,        You can manually modify the configuration "plugin": {"Enabled": false, # Default does not turn on the plug-in mechanism "dir": "./plugin", # put the plugin script git repo clone to this directory "Git": "Https://github.com/open-falcon/plugin.git", # Place the plugin script git repo address "logs": "./logs" # plug-in execution log, if the plugin is performing a problem, you can Go to this directory to see log}, "Heartbeat": {"Enabled": True, # here enabled to set to True "addr": "127.0.0.1:6030", # HBS address, Port Is the RPC port of HBS "interval": 60, # Heartbeat period, unit is seconds "Timeout": 1000 # Timeout for connecting to HBS, in milliseconds}, "transfer": {"Ena Bled ": True, # here enabled to set to True" Addrs ": [" 127.0.0.1:8433 "," 127.0.0.1:8433 "], # TR        Ansfer address, port is transfer RPC port, can support write multiple transfer address, Agent will guarantee ha "interval": 60, # Acquisition period, unit is seconds, that is, agent one minute to collect data sent to transfer "Timeout": 1000 # timeout for connecting transferThe unit is milliseconds}, "http": {"Enabled": True, # Whether to listen to HTTP port "Listen": ": 1988" # If listening, listen to the address, collect the data through the agent's v1/p Ush interface Forwarding}, "collector": {"Ifaceprefix": ["ETH", "em"] # Default configuration will only collect network card name prefix is ETH, EM network card traffic, configured to empty will collect all, Lo will also be collected. You can see the traffic information of each network card from/proc/net/dev}, "Ignore": {# The default collection of more than 200 metric, can be set by ignore to not collect "cpu.busy": true, "mem. Swapfree ": true}} Interface Usage paradigm: ts= ' date +%s '; Curl-x post-d "[{\" metric\ ": \" metric.demo\ ", \" endpoint\ ": \" qd-open-falcon-judge01.hd\ ", \" Timestamp\ ": $ts, \" Step\ ": 60,\" value\ ": 9,\" countertype\ ": \" gauge\ ", \" Tags\ ": \" project=falcon,module=judge\ "}]" Http://127.0.0.1:1988/v1 /push necessary Data structures: metric: The core of the field, which represents the specific measure of the acquisition, such as Cpu_idle, or Memory_free, or qpsendpoint: the subject of the metric (owner), For example, if metric is Cpu_idle, then endpoint indicates which machine is cpu_idletimestamp: The UNIX timestamp when the data was reported, the integer, and the second value, which represents the metric at the current point in time. Float64step: Represents the reporting period for this data acquisition item, which is important for subsequent configuration monitoring policies and must be explicitly specified. CounterType: can only be counter or GAUGE two, the former indicates that the data acquisition item is a timer type, the latter indicates that it is the original value (note case) GAUGE: That is, the user upload what value, on the unchanged storage CounteR: When the indicator is stored and displayed, it is calculated as speed, i.e. (current value-last value)/time interval Tags: a set of comma-separated key-value pairs, metric further description and refinement, can be an empty string. such as IDC=LG, such as Service=xbox, and so on, multiple tags separated by commas
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.