Linux under Open-falcon Agent installation Tutorial

Source: Internet
Author: User
Tags pack


The Open-falcon Agent project was preceded by a stand-alone project named Falcon-eye, which comes from the Linux-dash project with its own web page. Agent used to collect machine load monitoring indicators, such as Cpu.idle, Load.1min, Disk.io.util, and so on, every 60 seconds push to transfer. Agent and transfer established a long connection, the data sent faster, the agent provides an HTTP interface/v1/push used to receive user manual push some data, and then quickly forwarded to transfer via long connection.

First, the source code installation

CD $GOPATH/src/github.com/open-falcon/agent
Go get./...
./control Build
./control Pack

The final step will pack out a tar.gz installation package and take the package to deploy the service. It should be noted that at compile time of the source code:

1, the need for host configuration Gopath environment variables (generally can be configured as user home directory);

2, the need for the host can be connected to the extranet, through go to download the relevant source code package.

3, compile pack out of the package, in other agent host deployment, no need to connect extranet, pack out of the package, can be similar to the interpretation of the C source code compiled from the binary file.

Second, the configuration notes

The configuration file must be called Cfg.json, can be modified based on Cfg.example.json, the default file does not exist, through./control automatically copies a copy from Cfg.example.json to Cfg.json.


{
' Debug ': true,
"Hostname": "",
"IP": "",
"Plugin": {
' Enabled ': false, # Default does not open plugin mechanism
"dir": "./plugin",
"Git": "Https://coding.net/ulricqin/plugin.git",
"Logs": "./logs"
},
"Heartbeat": {
' Enabled ': True, # Enabled to be set to True
"Addr": "127.0.0.1:6030", # HBS address, port is HBS RPC port
"Interval": 60,
"Timeout": 1000
},
"Transfer": {
' Enabled ': True, # Enabled to be set to True
"Addr": "127.0.0.1:8433", # Transfer address, port is transfer RPC port
"Interval": 60,
"Timeout": 1000
},
"http": {
' Enabled ': true,
"Listen": ": 1988"
},
"Collector": {
"Ifaceprefix": ["ETH", "Em"] # The default configuration only collects the network card name prefix is ETH, the EM network card traffic, the configuration is empty will collect all, Lo's also will collect. Can see the traffic information of each network card from/proc/net/dev
},
"Ignore": {# More than 200 metric are collected by default, which can be set by ignore to not collect
"Cpu.busy": true,
' Mem.swapfree ': true
}
}

III. Process Management

./control START Process
./control Stop Process
./control Restart Restart process
./control Status View Process state
./control tail View Var/app.log in tail-f way

Verify

Look at the log under the Var directory is normal, or browser access to its 1988 port. In addition, the agent provides a--check parameter to check whether the agent can run normally on the current machine.

./falcon-agent--check
/v1/push interface

This interface is not used for a while, but here is the official Wiki first extract memo: "We are designed to not want users to directly connect to transfer send data, but through the agent's/v1/push interface forwarding, interface use example."

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
Open the URL http://IP:1988 can view the relevant monitoring information, the above picture (click the picture to see the larger image):

Here to spit, use Firefox and IE browser can view the page normally. Using the 360 speed browser is not normal to view the page, a good garbage browser.

The Open-falcon agent (independently of the project) and the Linux-dash described earlier are a tool that can view the status of a stand-alone current information, but the Open-falcon agent has the advantage of using the go language. When the host state information is obtained, the speed is very fast and the resource is not occupied. Praise one.

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.