项目作者: btccom

项目描述 :
open-falcon plugins for agents
高级语言: Python
项目地址: git://github.com/btccom/open-falcon-plugins.git
创建时间: 2018-10-30T03:41:25Z
项目社区:https://github.com/btccom/open-falcon-plugins

开源协议:

下载


open-falcon plugins

中文版文档请点这里

Prerequisite

Falcon agent is downloaded and deployed.
If not, download the latest release from
here.
Decompress it.

The binaries inside are runnable on Linux and you do not need Golang.

Install agents

Note: skip this section if you already have agents running on your servers.

A similar content has been already covered in
this article.
English version is also available on the same site.

An agent should be deployed to every server you wish to monitor.
You still need to download and decompress the whole Falcon+ package.
Its config file is stored as $OPEN_FALCON_HOME/agent/config/cfg.json.

  • The addrs field of “transfer” is the most important part of all configurations
    that determines to which transfer service this agent sends its data.
    By default it is the port 8433 of Falcon master API service.
  • Change heartbeat to point to heartbeat service on the master,
    similar to the previous step.
  • Enable “plugin” and it will be useful later.
  • (Optional but strongly encouraged) enable “http” so that the agent accepts custom data push.

Now it is good to start the agent

  1. cd $OPEN_FALCON_HOME
  2. ./open-falcon start agent

Make sure from the dashboard UI that the new agent is successfully registered.

Install this repo

If plugin is not enabled in $OPEN_FALCON_HOME/agent/config/cfg.json yet,
do it.
After that restart the agent.

  1. cd $OPEN_FALCON_HOME
  2. ./open-falcon restart agent

Replace “git” to “https://github.com/btccom/open-falcon-plugins“.

For each plugin to work, you will need a config JSON file in
$OPEN_FALCON_HOME/agent/config which has the same name as the plugin.
For example in order for proc/60_pid.py to work,
a file named 60_pid.json needs to be present.
Read the comments of individual plugins for more details on the format and content of config files.

Go to the Falcon dashboard web, find the host group where the server is
and add the directories of plugins that you would like to activate into plugins.
For instance if you wish to used the 60_pid.py plugin,
add proc into the list of plugin dir.

Run

Run the command below:

  1. curl http://127.0.0.1:1988/plugin/update

It will pull the git repo and start scheduling your plugins.

If success is returned,
it means the github repo is pulled successfully and the agent is notified.

Debug

See all the logs of agents.

  1. tail -f agent/logs/agent.log