In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to install and use open-falcon agent in linux. Xiaobian thinks it is quite practical, so share it with you as a reference. I hope you can gain something after reading this article.
The open-falcon agent project was preceded by a standalone project called falcon-eye, which came with a web page from the linux-dash project. agent is used to collect machine load monitoring indicators, such as cpu.idle, load.1min, disk.io.util, etc., and push to Transfer every 60 seconds. Agent establishes a long connection with Transfer, and the data sending speed is relatively fast. Agent provides an http interface/v1/push for receiving some data manually pushed by users, and then quickly forwards it to Transfer through a long connection.
I. Source code installation cd $GOPATH/src/github.com/open-falcon/agentgo get ./.../ control build./ control pack
The last step will pack out a tar.gz installation package, take this package to deploy the service. Note that when compiling the source code:
1. The host needs to configure the GOPATH environment variable (which can generally be configured as a user directory);
2. The host computer needs to be connected to the external network and download the relevant source code package through go get.
3. When the compiled package is deployed on other agent hosts, there is no need to connect to the external network. The package packed can be similarly understood as a binary file compiled from c source code.
II. Configuration Description
The configuration file must be called cfg.json. It can be modified based on cfg.example.json. By default, the file does not exist. Through./ Control start automatically copies cfg.example.json as cfg.json
{"debug": true,"hostname": "","ip": "","plugin": {"enabled": false, #Plugin mechanism is not enabled by default "dir": "./ plugin","git": "https://coding.net/ulricqin/plugin.git","logs": "./ logs"},"heartbeat":{"enabled": true, #enabled here To set true"addr": "127.0.0.1:6030", #address of hbs, port is rpc port of hbs "interval": 60,"timeout": 1000},"transfer": {"enabled": true, #enabled here To set true"addr": "127.0.1: 8433", #address of transfer, port is rpc port of transfer "interval": 60,"timeout": 1000},"http": {"enabled": true,"listen": ":1988"},"collector": {"ifacePrefix":["eth", "em"] #Default configuration will only collect the network card traffic whose network card name prefix is eth and em. If the configuration is blank, all will be collected, and so will lo. You can see the traffic information of each NIC from/proc/net/dev},"ignore": { #More than 200 metrics are collected by default, and you can set "cpu.busy": true,"mem.swapfree": true}} through ignore. III. Process management./ control start Start the process./ control stop Stop the process./ control restart Restart process./ control status View progress status./ control tail View var/app.log with tail -f Verification
See if the log under var directory is normal, or the browser accesses its port 1988. In addition, the agent provides a-check parameter, which can check whether the agent can run normally on the current machine.
./ falcon-agent --check/v1/push interface
This interface has not been used yet, but here is still the official wiki original words first extract memo: "Our original design is not to want users to directly connect to Transfer to 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 url http://IP:1988 to view relevant monitoring information. The above picture (click the picture to see the enlarged picture):
This page can be viewed normally using Firefox and IE browsers. This page cannot be viewed properly when using 360 Speed browser. What a rubbish browser.
open-falcon agent (independent of the project) and linux-dash introduced earlier belong to a tool that can view the current status of a stand-alone message, but open-falcon agent has the advantage of using the go language. When obtaining host status information, the speed is quite fast, and the resource consumption is not good. Nice one.
About "how to install and use open-falcon agent in linux" this article is shared here, I hope the above content can be of some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.