Skip to content

Commit

Permalink
Merge pull request #24 from open-falcon/plus-dev
Browse files Browse the repository at this point in the history
[doc] update doc
  • Loading branch information
laiwei committed Mar 24, 2017
2 parents b00d0c8 + 8ed27fb commit 8b9d697
Show file tree
Hide file tree
Showing 14 changed files with 152 additions and 1,486 deletions.
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
language: go

go:
- 1.6

before_install:
- go get github.com/rancher/trash

install:
- trash
- go get ./

script:
make all

after_success:
- go test -race -coverprofile=coverage.txt -covermode=atomic github.com/open-falcon/falcon-plus/modules/api/test
- bash <(curl -s https://codecov.io/bash)
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pack: checkbin
@bash ./config/confgen.sh
@cp $(TARGET) ./out/$(TARGET)
tar -C out -zcf open-falcon-v$(VERSION).tar.gz .
#@rm -rf out
@rm -rf out

clean:
@rm -rf ./bin
Expand Down
87 changes: 47 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,72 +2,76 @@

![Open-Falcon](./logo.png)

[![Build Status](https://travis-ci.org/Cepave/open-falcon-backend.svg?branch=develop)](https://travis-ci.org/Cepave/open-falcon-backend)
[![codecov](https://codecov.io/gh/Cepave/open-falcon-backend/branch/develop/graph/badge.svg)](https://codecov.io/gh/Cepave/open-falcon-backend)
[![GoDoc](https://godoc.org/github.com/Cepave/open-falcon-backend?status.svg)](https://godoc.org/github.com/Cepave/open-falcon-backend)
[![Join the chat at https://gitter.im/goappmonitor/Lobby](https://badges.gitter.im/goappmonitor/Lobby.svg)](https://gitter.im/goappmonitor/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Code Health](https://landscape.io/github/Cepave/open-falcon-backend/master/landscape.svg?style=flat)](https://landscape.io/github/Cepave/open-falcon-backend/master)
[![Code Issues](https://www.quantifiedcode.com/api/v1/project/df24b20e9c504ad0a2ac9fa3e99936f5/badge.svg)](https://www.quantifiedcode.com/app/project/df24b20e9c504ad0a2ac9fa3e99936f5)
[![Go Report Card](https://goreportcard.com/badge/github.com/Cepave/open-falcon-backend)](https://goreportcard.com/report/github.com/Cepave/open-falcon-backend)
[![Build Status](https://travis-ci.org/open-falcon/falcon-plus.svg?branch=plus-dev)](https://travis-ci.org/open-falcon/falcon-plus)
[![codecov](https://codecov.io/gh/open-falcon/falcon-plus/branch/plus-dev/graph/badge.svg)](https://codecov.io/gh/open-falcon/falcon-plus)
[![GoDoc](https://godoc.org/github.com/open-falcon/falcon-plus?status.svg)](https://godoc.org/github.com/open-falcon/falcon-plus)
[![Code Issues](https://www.quantifiedcode.com/api/v1/project/5035c017b02c4a4a807ebc4e9f153e6f/badge.svg)](https://www.quantifiedcode.com/app/project/5035c017b02c4a4a807ebc4e9f153e6f)
[![Go Report Card](https://goreportcard.com/badge/github.com/open-falcon/falcon-plus)](https://goreportcard.com/report/github.com/open-falcon/falcon-plus)
[![License](https://img.shields.io/badge/LICENSE-Apache2.0-ff69b4.svg)](http://www.apache.org/licenses/LICENSE-2.0.html)

# Documentations

- http://book.open-falcon.org
- http://docs.openfalcon.apiary.io
- [Installation and Usage](http://book.open-falcon.org)
- [Open-Faclon API](http://api.open-falcon.org)

# Get Started

* before start , please make sure you prepared [this](https://book.open-falcon.org/zh/install_from_src/prepare.html) ready.
*before start , please make sure you prepared [this](https://book.open-falcon.org/zh/install_from_src/prepare.html) ready.*

And then

git clone https://github.com/open-falcon/open-falcon.git
cd open-falcon
```
git clone https://github.com/open-falcon/falcon-plus.git
cd falcon-plus/
```

# Compilation

```bash
```
# all modules
make all
# specified module
make agent
# pack all module
# pack all modules
make pack
```

* after `make pack` you will got `open-falcon-vx.x.x.tar.gz`
* if you want edit configure file for each module, you can edit `config/xxx.json` before you do `make pack`
* *after `make pack` you will got `open-falcon-vx.x.x.tar.gz`*
* *if you want to edit configure file for each module, you can edit `config/xxx.json` before you do `make pack`*

# Decompose
# Unpack and Decompose

```
mkdir $WorkingDir
tar -xzvf open-falcon-vx.x.x.tar.gz -C $WorkingDir
cd $WorkingDir
export WorkDir="$HOME/open-falcon"
mkdir -p $WorkDir
tar -xzvf open-falcon-vx.x.x.tar.gz -C $WorkDir
cd $WorkDir
```

# Run Open-Falcon Commands

Agent for example:
```bash
# ./open-falcon [build|pack|start|stop|restart|status|tail] module
for example:

```
# ./open-falcon [start|stop|restart|check|monitor|reload] module
./open-falcon start hbs
./open-falcon check
# falcon-graph UP 15525
# falcon-hbs UP 15428
# falcon-sender DOWN -
# falcon-query DOWN -
# falcon-judge DOWN -
# falcon-transfer UP 15476
# falcon-nodata DOWN -
# falcon-task DOWN -
# falcon-aggregator DOWN -
# falcon-agent UP 16601
# falcon-gateway DOWN -
# falcon-api UP 16762
falcon-graph UP 79292
falcon-hbs UP 79295
falcon-sender UP 79298
falcon-judge UP 79301
falcon-transfer UP 79304
falcon-nodata UP 79307
falcon-task UP 79310
falcon-aggregator UP 79313
falcon-agent UP 79316
falcon-gateway UP 79319
falcon-api UP 98421
falcon-alarm UP 86388
```

* For debugging , You can check `$WorkDir/$moduleName/log/logs/xxx.log`
Expand All @@ -81,8 +85,10 @@ Make sure you're using Go 1.5+ and **GO15VENDOREXPERIMENT=1** env var is exporte
1. Edit `trash.yml` file to your needs. See the example as follow.
2. Run `trash --keep` to download the dependencies.

```yaml
package: github.com/open-falcon/open-falcon
trash file example:

```
package: github.com/open-falcon/falcon-plus
import:
- package: github.com/open-falcon/common # package name
Expand All @@ -92,9 +98,10 @@ import:

# Package Release

make clean all pack

```
make clean all pack
```

# Q&A

Any issue or question is welcome, Please feel free to open github issues.
Any issue or question is welcome, Please feel free to open github issues:)
8 changes: 4 additions & 4 deletions config/alarm.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"highQueues": [
"event:p0",
"event:p1",
"event:p2",
"event:p3",
"event:p4",
"event:p5"
"event:p2"
],
"lowQueues": [
"event:p3",
"event:p4",
"event:p5",
"event:p6"
],
"userSmsQueue": "/queue/user/sms",
Expand Down
11 changes: 5 additions & 6 deletions modules/agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ It is a golang classic project
# set $GOPATH and $GOROOT
mkdir -p $GOPATH/src/github.com/open-falcon
cd $GOPATH/src/github.com/open-falcon
git clone https://github.com/open-falcon/agent.git
cd agent
go get ./...
git clone https://github.com/open-falcon/falcon-plus.git
cd falcon-plus/modules/agent
go get
./control build
./control start

Expand All @@ -29,7 +29,6 @@ I use [linux-dash](https://github.com/afaqurk/linux-dash) as the page theme.
- transfer: transfer rpc address
- ignore: the metrics should ignore

# Deployment

http://ulricqin.com/project/ops-updater/
# Auto deployment

Just look at https://github.com/open-falcon/ops-updater
39 changes: 3 additions & 36 deletions modules/aggregator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,14 @@

集群聚合模块。聚合某集群下的所有机器的某个指标的值,提供一种集群视角的监控体验。

## 准备工作

> 如果你已经安装过open-falcon了,那么请检查:
> 检查你的portal中是否有这个代码:https://github.com/open-falcon/portal/blob/master/web/model/cluster.py,如果有了,说明版本OK,否则,需要升级原来的portal为最新版代码。
falcon_portal数据库中加入了一张新表:

```sql
USE falcon_portal;
SET NAMES 'utf8';

DROP TABLE IF EXISTS cluster;
CREATE TABLE cluster
(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
grp_id INT NOT NULL,
numerator VARCHAR(10240) NOT NULL,
denominator VARCHAR(10240) NOT NULL,
endpoint VARCHAR(255) NOT NULL,
metric VARCHAR(255) NOT NULL,
tags VARCHAR(255) NOT NULL,
ds_type VARCHAR(255) NOT NULL,
step INT NOT NULL,
last_update TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
creator VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
)
ENGINE =InnoDB
DEFAULT CHARSET =latin1;

```

## 源码编译

```bash
cd $GOPATH/src/github.com/open-falcon
git clone https://github.com/open-falcon/sdk.git
git clone https://github.com/open-falcon/aggregator.git
cd aggregator
go get ./...
git clone https://github.com/open-falcon/falcon-plus.git
cd falcon-plus/modules/aggregator
go get
./control build
./control pack
```
Expand Down
30 changes: 3 additions & 27 deletions modules/api/ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
# OWL_Backend
# Documentations

![Alt text](data/owl_backend_icon.jpg)

[https://masato25.github.io/owl_backend/](https://masato25.github.io/owl_backend/)

[ web api backend made for open-falcon ]


开源版本 open-falcon 後台, 将以下模组的操作功能api化:

* Fe
* 使用者,群组管理
* Portal
* HostGroup, Host 管理
* Template, 告警策略管理
* Graph
* Host/Counter列表查询
* No-Data
* NoData策略设置api
* Dashboard
* 具备数据查询接口功能

# ToDo
* Screen

ps.
跨域问题實做可以參考 `sample_for_cross_api`
- [Installation and Usage](http://book.open-falcon.org)
- [Open-Faclon API](http://api.open-falcon.org)
1 change: 0 additions & 1 deletion modules/api/_config.yml

This file was deleted.

Loading

0 comments on commit 8b9d697

Please sign in to comment.