Open-falcon Monitoring Flume

Source: Internet
Author: User

1. First you need to know flume HTTP monitoring if booting

Please refer to the monitoring parameters of the blog flume

That is, in Http://localhost:3000/metrics, you can access the following content

2. Install the Flume monitor plugin in Open-falcon, refer to the official documentation http://book.open-falcon.org/zh_0_2/usage/flume.html

Official documentation is very unclear, please refer to the next steps in this article

First modify the agent's configuration file, the agent is responsible for the acquisition of data, and the function of scheduling script plug-ins

~/software/open-falcon-v0.2.1/agent/configvim Cfg.json

Modify the following, which is the GIT address written to the Flume monitoring script, thanks to the plugin author's guidance in the learning process

Https://github.com/mdh67899/openfalcon-monitor-scripts

The Cfg.json configuration is updated in memory, and if the configuration is not updated it is not loaded, access the following URL to

Http://127.0.0.1:1988/config/reload

Download plugin, Access http://localhost:1988/plugin/update

After viewing the directory ~/software/open-falcon-v0.2.1/plugin, you will find a flume folder, this is just download the plugin

~/software/open-falcon-v0.2.1/plugin$ Lsflume

See if the downloaded plugin has execute permissions

[Email protected]:~/software/open-falcon-v0.2.1/plugin/flume$ ls60_flume-monitor.py  README.md[email protected ]:~/software/open-falcon-v0.2.1/plugin/flume$ ls-al Total dosage 16drwxrwxr-x 2 lintong lintong 4096 May   2 11:13. Drwxrwxr-x 4 L Intong lintong 4096 May   2 11:13.. -rw-rw-r--1 lintong lintong 2813 May   2 11:13 60_flume-monitor.py-rw-rw-r--1 lintong lintong 3981 May   2 11:13 READM E.md

If you do not have Execute permissions, add Execute permissions

sudo chmod 777 60_flume-monitor.py

3. Binding plugins in Open-falcon

First, add a new group to the host and call it flume.

Add a host, add this machine, my native is called lintong-b250m-ds3h

Add a plugins, add flume plugin

Note: Here's plugin dir and ~/software/open-falcon-v0.2.1/agent/config/cfg.json in the dir about

For example, our Cfg.json is written in./plugin, where the root directory refers to ~/software/open-falcon-v0.2.1, and then the plug-in installation directory is ~/software/ Open-falcon-v0.2.1/plugin

Then our plugin dir needs to make a full plug-in address with the plugin installation directory

Because our plug-in address is ~/software/open-falcon-v0.2.1/plugin/flume/60_flume-monitor.py, so plugin dir here is going to write flume

4. Modify the Flume monitoring script

#r = Requests.post ("Http://127.0.0.1:1988/v1/push", Data=json.dumps (payload)) # Uncomment

5. Restart Open-falcon, this step to find out if there is no need to restart the way

./open-falcon Stop./open-falcon Start

6. Under Agent/logs Check the plugin run log, has appeared, indicating that the plugin has been successfully run up

2018/05/02 12:41:23 plugin.go:78: <plugins:[flume], timestamp:1525236083>

Open-falcon Monitoring Flume

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.