Git Product home page Git Product logo

falcon-plus's Introduction

Falcon+

Open-Falcon

Build Status License Backers on Open Collective Sponsors on Open Collective

Notice

If you are heavily using k8s and adopting microservices architecture, we recommend you to upgrade to use Nightingale building your modern monitoring system.

  • Nightingale is an enterprise-level cloud-native monitoring tool, which can be used as drop-in replacement of Prometheus for alerting and management.
  • Categraf is one-stop telemetry collector for Nightingale / Prometheus / M3DB / VictoriaMetrics / Thanos / Influxdb / TDengine.

It is recommended that you use FlashDuty as the OnCall system to realize alarm aggregation convergence, claiming, upgrading, scheduling, and coordination, so that the alarm can be reached efficiently and ensure that the alarm processing is not missed.

Documentations

Prerequisite

  • Git >= 1.7.5
  • Go >= 1.6

Getting Started

Docker

Please refer to ./docker/README.md.

Build from source

before start, please make sure you prepared this:

yum install -y redis
yum install -y mysql-server

NOTE: be sure to check redis and mysql-server have successfully started.

And then

# Please make sure that you have set `$GOPATH` and `$GOROOT` correctly.
# If you have not golang in your host, please follow [https://golang.org/doc/install] to install golang.

mkdir -p $GOPATH/src/github.com/open-falcon
cd $GOPATH/src/github.com/open-falcon
git clone https://github.com/open-falcon/falcon-plus.git

And do not forget to init the database first (if you have not loaded the database schema before)

cd $GOPATH/src/github.com/open-falcon/falcon-plus/scripts/mysql/db_schema/
mysql -h 127.0.0.1 -u root -p < 1_uic-db-schema.sql
mysql -h 127.0.0.1 -u root -p < 2_portal-db-schema.sql
mysql -h 127.0.0.1 -u root -p < 3_dashboard-db-schema.sql
mysql -h 127.0.0.1 -u root -p < 4_graph-db-schema.sql
mysql -h 127.0.0.1 -u root -p < 5_alarms-db-schema.sql

NOTE: if you are upgrading from v0.1 to v0.2.0(or above),then. More upgrading instruction

mysql -h 127.0.0.1 -u root -p < 5_alarms-db-schema.sql

Compilation

cd $GOPATH/src/github.com/open-falcon/falcon-plus/

# make all modules
make all

# make specified module
make agent

# pack all modules
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

Unpack and Decompose

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

Start all modules in single host

cd $WorkDir
./open-falcon start

# check modules status
./open-falcon check

Run More Open-Falcon Commands

for example:

# ./open-falcon [start|stop|restart|check|monitor|reload] module
./open-falcon start agent

./open-falcon check
        falcon-graph         UP           53007
          falcon-hbs         UP           53014
        falcon-judge         UP           53020
     falcon-transfer         UP           53026
       falcon-nodata         UP           53032
   falcon-aggregator         UP           53038
        falcon-agent         UP           53044
      falcon-gateway         UP           53050
          falcon-api         UP           53056
        falcon-alarm         UP           53063
  • For debugging , You can check $WorkDir/$moduleName/logs/xxx.log

Install Frontend Dashboard

NOTE: if you want to use grafana as the dashboard, please check this.

Package Release

make clean all pack

API Standard

Q&A

  • Any issue or question is welcome, Please feel free to open github issues :)
  • FAQ

Contributors

This project exists thanks to all the people who contribute. [Contribute].

falcon-plus's People

Contributors

710leo avatar andyxning avatar appleboy avatar caglar10ur avatar chyeh avatar cmgs avatar danieldai avatar dongfanliang avatar gaojiasheng avatar hitripod avatar hnakamur avatar jack2chen avatar jojohappy avatar junhuizx avatar laiwei avatar masato25 avatar mdh67899 avatar michalderkacz avatar milkwine avatar missuzhang avatar mistshi avatar n4mine avatar niean avatar oiooj avatar salixleaf avatar sumaig avatar ulricqin avatar vbatoufflet avatar xingfusye avatar yubo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

falcon-plus's Issues

报警合并功能是否取消了

在说明文档里看到 Links是为报警合并功能写的组件。
但是遍寻也没找到这个组件。
请问是否集成到falcon-plus中了。

transfer 异常应该如何处理

今天发现图表没有更新,跟据文档排查问题
image
发现应该是transfer不工作了,日志如下:

2017/05/11 16:32:23 sender.go:60: send.Start, ok
2017/05/11 16:32:23 http.go:43: http.startHttpServer ok, listening 0.0.0.0:6060
2017/05/11 16:32:23 rpc.go:26: rpc listening 0.0.0.0:8433
2017/05/11 16:32:23 socket.go:24: socket listening 0.0.0.0:4444
2017/05/11 16:52:37 cfg.go:115: g.ParseConfig ok, file  /root/open-falcon/transfer/config/cfg.json
2017/05/11 16:52:37 proc.go:57: proc.Start, ok
2017/05/11 16:52:37 sender.go:60: send.Start, ok
2017/05/11 16:52:37 http.go:43: http.startHttpServer ok, listening 0.0.0.0:6060
2017/05/11 16:52:37 rpc.go:26: rpc listening 0.0.0.0:8433
2017/05/11 16:52:37 socket.go:24: socket listening 0.0.0.0:4444

尝试过重启但是不工作

请问这种情况下应该如何排查问题呢?

agent 日志

2017/05/11 17:12:41 var.go:95: <= <Total=6, Invalid:0, Latency=0ms, Message:ok>
2017/05/11 17:13:00 var.go:88: => <Total=6> <Endpoint:ip-192-168-2-234, Metric:rate, Type:GAUGE, Tags:name=pfc.push.cnt, Step:60, Time:1494493980, Value:0.016666980930092244>
2017/05/11 17:13:00 var.go:95: <= <Total=6, Invalid:0, Latency=0ms, Message:ok>
2017/05/11 17:13:00 var.go:88: => <Total=5> <Endpoint:ip-192-168-2-234, Metric:rate, Type:GAUGE, Tags:name=pfc.push.cnt, Step:60, Time:1494493980, Value:0.01667120358384762>
2017/05/11 17:13:00 var.go:95: <= <Total=5, Invalid:0, Latency=0ms, Message:ok>
2017/05/11 17:13:41 var.go:88: => <Total=69> <Endpoint:虚拟机, Metric:agent.alive, Type:GAUGE, Tags:, Step:60, Time:1494494021, Value:1>
2017/05/11 17:13:41 var.go:88: => <Total=9> <Endpoint:虚拟机, Metric:df.bytes.free.percent, Type:GAUGE, Tags:mount=/,fstype=ext4, Step:60, Time:1494494021, Value:79.10337285445647>
2017/05/11 17:13:41 var.go:95: <= <Total=69, Invalid:0, Latency=0ms, Message:ok>
2017/05/11 17:13:41 var.go:95: <= <Total=9, Invalid:0, Latency=0ms, Message:ok>
2017/05/11 17:13:41 var.go:88: => <Total=6> <Endpoint:虚拟机, Metric:ss.closed, Type:GAUGE, Tags:, Step:60, Time:1494494021, Value:2>
2017/05/11 17:13:41 var.go:95: <= <Total=6, Invalid:0, Latency=0ms, Message:ok>
2017/05/11 17:14:00 var.go:88: => <Total=6> <Endpoint:ip-192-168-2-234, Metric:rate, Type:GAUGE, Tags:name=pfc.push.cnt, Step:60, Time:1494494040, Value:0.016666625572323547>
2017/05/11 17:14:00 var.go:95: <= <Total=6, Invalid:0, Latency=0ms, Message:ok>
2017/05/11 17:14:00 var.go:88: => <Total=5> <Endpoint:ip-192-168-2-234, Metric:rate, Type:GAUGE, Tags:name=pfc.push.cnt, Step:60, Time:1494494040, Value:0.016666585262342045>
2017/05/11 17:14:00 var.go:95: <= <Total=5, Invalid:0, Latency=0ms, Message:ok>

graph日志

2017/05/11 16:52:34 debug.go:45: [GIN-debug] POST   /api/v2/config/reload     --> github.com/open-falcon/falcon-plus/modules/graph/http.configCommonRoutes.func5 (3 handlers)
2017/05/11 16:52:34 debug.go:45: [GIN-debug] GET    /api/v2/stats/graph-queue-size --> github.com/open-falcon/falcon-plus/modules/graph/http.configCommonRoutes.func6 (3 handlers)
2017/05/11 16:52:34 debug.go:45: [GIN-debug] GET    /counter/all              --> github.com/open-falcon/falcon-plus/modules/graph/http.configProcRoutes.func1 (3 handlers)
2017/05/11 16:52:34 debug.go:45: [GIN-debug] GET    /index/updateAll          --> github.com/open-falcon/falcon-plus/modules/graph/http.configIndexRoutes.func1 (3 handlers)
2017/05/11 16:52:34 debug.go:45: [GIN-debug] GET    /index/updateAll/concurrent --> github.com/open-falcon/falcon-plus/modules/graph/http.configIndexRoutes.func2 (3 handlers)
2017/05/11 16:52:34 debug.go:45: [GIN-debug] POST   /api/v2/index             --> github.com/open-falcon/falcon-plus/modules/graph/http.configIndexRoutes.func3 (3 handlers)
2017/05/11 16:52:34 cfg.go:90: g.ParseConfig ok, file /root/open-falcon/graph/config/cfg.json
2017/05/11 16:52:34 db.go:26: g.InitDB ok
2017/05/11 16:52:34 rrdtool.go:55: rrdtool.Start ok
2017/05/11 16:52:34 main.go:21: 27065 register signal notify
2017/05/11 16:52:34 rpc.go:54: rpc.Start ok, listening on 0.0.0.0:6070

版本是v0.2

执行make all 总是报错

go get ./modules/agent
go install: no install location for directory /opt/go/src/github.com/open-falcon/falcon-plus/modules/agent outside GOPATH
For more details see: 'go help gopath'
make: *** [agent] Error 1

报警误报的问题

metric/tags [note] condition max P run operation
cash.amount.diff [当前值比昨日同期值少于百分之80] all(#1)<=-80 1 3
cash.amount.diff [当前值比昨日同期值大于百分之80] all(#1)>=80 1 3

上面是我设置的报警策略,

但是我发现有误报情况,
OK
P3
Endpoint:NON.LTD
Metric:cash.amount.diff
Tags:
all(#1): -70.81019<=-80
Note:当前值比昨日同期值少于百分之80
Max:1, Current:1

请问为什么会造成这种现象呢?

make all 需要执行多久呢?感觉看不到结束时间啊?

make all 需要执行多久呢?感觉看不到结束时间啊?一直处于:
[work@localhost falcon-plus]$ make all
go get -u github.com/rancher/trash
trash -k -cache package_cache_tmp
INFO[0000] Trash! Reading file: 'trash.yml'
INFO[0000] Checking out 'github.com/Sirupsen/logrus', commit: '61e43dc76f7ee59a82bdf3d71033dc12bea4c77d'
INFO[0000] Checking out 'github.com/gin-gonic/gin', commit: 'v1.1.4'
INFO[0000] Preparing cache for 'github.com/masato25/yaag'

然后就一直在这个状态,

Failed to execute `make all`

I've exported the following environment variable:

deployer@FAL01:~$ echo $GOROOT
/home/deployer/go
deployer@FAL01:~$ echo $GOPATH
/home/deployer/falcon-plus
deployer@FAL01:~$ which go
/home/deployer/go/bin/go
deployer@FAL01:~$ go version
go version go1.8.1 linux/amd64

Then I switch to the the falcon-plus source code path and execute make all command:

deployer@FAL01:~/falcon-plus/src/github.com/open-falcon/falcon-plus$ pwd
/home/deployer/falcon-plus/src/github.com/open-falcon/falcon-plus
deployer@FAL01:~/falcon-plus/src/github.com/open-falcon/falcon-plus$ make all
govendor sync
Error: Remotes failed for:
	Failed for "golang.org/x/net/context" (failed to ping remote repo): unrecognized import path "golang.org/x/net/context"

make: *** [install] Error 2

I've run the sh fix_gosource_fetch_error.sh shell script. Any help is appreciated.

nodata 异常crash

go 1.7.5 1.8.1
./open-falcon start 可以启动nodata 但是一会就crash
下边是错误日志,找不到事哪里的问题,能帮忙看下吗

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x38 pc=0x47da14]

goroutine 34 [running]:
panic(0x74af20, 0xc42000e0d0)
/home/data/ops/app/go/src/runtime/panic.go:500 +0x1a1
github.com/open-falcon/falcon-plus/modules/nodata/collector.fetchItemsAndStore(0xc4200bd100, 0x2, 0x2, 0x2, 0x0, 0x0, 0x0)
/home/data/ops/app/src/github.com/open-falcon/falcon-plus/modules/nodata/collector/collector_cron.go:136 +0x584
github.com/open-falcon/falcon-plus/modules/nodata/collector.collectDataOnce.func1(0xc42000f530, 0xc4200508c0, 0xc4200bd100, 0x2, 0x2, 0x2)
/home/data/ops/app/src/github.com/open-falcon/falcon-plus/modules/nodata/collector/collector_cron.go:82 +0x73
created by github.com/open-falcon/falcon-plus/modules/nodata/collector.collectDataOnce
/home/data/ops/app/src/github.com/open-falcon/falcon-plus/modules/nodata/collector/collector_cron.go:84 +0x26c

screen dump and import

  • Users can easily dump the screens to an configure file and share to others.
  • Other people can load the configure file.

falcon 能否支持报警条件组合

请问falcon能否支持多个条件都符合才能报警 吗,like 条件A && 条件B 都符合才能报警。
似乎当前是不支持的。未来会否支持呢?

数据库5.0版本问题导致graph组件无法正常插入数据

环境:
centos 6.5 x86_64
mysql Ver 14.12 Distrib 5.0.96

报错位置:
index_update_incr_task.go:101: Error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'endpoint(endpoint, ts, t_create) VALUES (?, ?, now()) ON DUPLICATE KEY UPDATE id' at line 1

验证解决方案:
表名endpoint后需有空格,才能正常执行。

mysql 5.1版本上未发现此类问题。

32位系统支持安装吗?

因为条件限制,只有32位的环境。
那么,请问能在32位的环境下安装吗?
如果可以,和64位的比,会有什么不同吗?

几处代码优化建议

$GOPATH/src/github.com/open-falcon/falcon-plus/g/tool.go:RmDup
$GOPATH/src/github.com/open-falcon/falcon-plus/vendor/github.com/toolkits/slice/unique.go:UniqueString
实现的是完全是相等的功能,有没有必要把这些都放在类库中呢?

$GOPATH/src/github.com/open-falcon/falcon-plus/common/utils/tags.go:SortedTags
$GOPATH/src/github.com/open-falcon/falcon-plus/common/utils/map.go:KeysOfMap
前一个函数中的实现完全可以调用后面这个函数,觉得没必要写重复代码

golang.org/x/sys/unix 如何下载

root@falcon-plus:/home/src/github.com/open-falcon/falcon-plus# make all
go get -u github.com/rancher/trash
trash -k -cache package_cache_tmp
INFO[0000] Trash! Reading file: 'vendor.conf'           
INFO[0000] Using 'github.com/rancher/trash' as the project's root package (from vendor.conf) 
INFO[0000] Checking out 'github.com/Sirupsen/logrus', commit: 'v0.10.0' 
INFO[0000] Checking out 'github.com/cloudfoundry-incubator/candiedyaml', commit: '99c3df8' 
INFO[0000] Checking out 'github.com/davecgh/go-spew', commit: '5215b55' 
INFO[0000] Checking out 'github.com/golang/sys', commit: 'a408501' 
INFO[0000] Checking out 'github.com/pmezard/go-difflib', commit: '792786c' 
INFO[0000] Checking out 'github.com/stretchr/testify', commit: 'v1.1.3' 
INFO[0000] Checking out 'github.com/urfave/cli', commit: 'v1.18.0' 
INFO[0000] Copying deps...                              
INFO[0000] Copying deps... Done                         
go get ./modules/agent
go build -o bin/agent/falcon-agent ./modules/agent
go get ./modules/aggregator
package golang.org/x/sys/unix: unrecognized import path "golang.org/x/sys/unix" (https fetch: Get https://golang.org/x/sys/unix?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
package golang.org/x/text/transform: unrecognized import path "golang.org/x/text/transform" (https fetch: Get https://golang.org/x/text/transform?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
package golang.org/x/text/unicode/norm: unrecognized import path "golang.org/x/text/unicode/norm" (https fetch: Get https://golang.org/x/text/unicode/norm?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
make: *** [aggregator] Error 1

使用dashboard配置的expression, alarm收到redis队列告警后异常退出

expression是在dashboard上直接配置的一条。
看日志似乎是因为直接配置的expression,event的strategy为空,往表event_cases表查数据时,引用eve.Strategy.Note时报空指针了?

alarm报错日志如下(xxx代替实际的endpoint值)
···
time="2017-05-02T16:31:02+08:00" level=debug msg="pop event: <Endpoint:xxx, Status:PROBLEM, Strategy:, Expression:<Id:3, Metric:ss.estab, Tags:map[endpoint:xxx], all(#1)>100 MaxStep:3, P4 ActionId:4>, LeftValue:121, CurrentStep:1, PushedTags:map[], TS:2017-05-02 16:31:00>"
[ORM]2017/05/02 16:31:02 -[Queries/default] - [ OK / db.Query / 4.5ms] - [select * from event_cases where id = ?] - e_3_2db1e7c23078c45b32d773bcb5306d14
time="2017-05-02T16:31:02+08:00" level=debug msg="events: <Endpoint:xxx, Status:PROBLEM, Strategy:, Expression:<Id:3, Metric:ss.estab, Tags:map[endpoint:xxx], all(#1)>100 MaxStep:3, P4 ActionId:4>, LeftValue:121, CurrentStep:1, PushedTags:map[], TS:2017-05-02 16:31:00>"
time="2017-05-02T16:31:02+08:00" level=debug msg="expression is null: false"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x910c02]

goroutine 21 [running]:
github.com/open-falcon/falcon-plus/modules/alarm/model/event.InsertEvent(0xc42027e600)
/root/go/src/github.com/open-falcon/falcon-plus/modules/alarm/model/event/event_operation.go:83 +0x7d2
github.com/open-falcon/falcon-plus/modules/alarm/cron.popEvent(0xc42025ddc0, 0x4, 0x4, 0x0, 0x0, 0x0)
/root/go/src/github.com/open-falcon/falcon-plus/modules/alarm/cron/event_reader.go:76 +0x597
github.com/open-falcon/falcon-plus/modules/alarm/cron.ReadLowEvent()
/root/go/src/github.com/open-falcon/falcon-plus/modules/alarm/cron/event_reader.go:37 +0x61
created by main.main
/root/go/src/github.com/open-falcon/falcon-plus/modules/alarm/main.go:46 +0x1dd
···

在dashboard删除了某个Endpoint之后,agent更新后,在dashboard也不会显示该Endpoint

在dashboard删除了某个Endpoint之后,即使agent还在上传数据,在dashboard也不会显示该Endpoint
例如在dashboard删除了名为test的Endpoint之后,test的agent依旧工作,但是dashboard却不会再显示test
删除时api的日志报:
(/home/falcon/gopath/src/github.com/open-falcon/falcon-plus/modules/api/app/controller/graph/graph_controller.go:227)
[2017-05-18 14:13:17] [2.63ms] select a.endpoint, b.id AS counter_id, b.counter, b.type, b.step from endpoint as a, endpoint_counter as b
where b.endpoint_id = a.id
AND a.endpoint in ('testtest')
time="2017-05-18T14:13:17+08:00" level=error msg="127.0.0.1:6070, call failed, err rpc: can't find method Graph.Delete. proc: Name:127.0.0.1:6070,Cnt:176,active:0,all:0,free:0"
time="2017-05-18T14:13:17+08:00" level=debug msg="Graph.Delete, params:[0xc420472d20], resp:&{}"

数据库graph库中endpoint表没有test的记录
数据库falcon_portal库中host表有test的记录

如何保证judge模块的高可用?

我看了一下transfer的代码,发现transfer对judge模块的一致性哈希表是不会动态变化的,judge的状态只是内存中缓存的11分钟数据,设计时为什么不考虑让transfer能够做到自动剔除不可用的judge呢?

error: unknown option `detach'

# make all
go get -u github.com/rancher/trash
trash -k -cache package_cache_tmp
INFO[0000] Trash! Reading file: 'trash.yml'             
INFO[0000] Preparing cache for 'github.com/open-falcon/rrdlite' 
INFO[0004] Checking out 'github.com/open-falcon/rrdlite', commit: 'b82d08f8da852b242ac87cd22f1cd01d33337d5d' 
INFO[0004] Fetching latest commits from 'origin' for 'github.com/open-falcon/rrdlite' 
FATA[0010] `git checkout -f --detach b82d08f8da852b242ac87cd22f1cd01d33337d5d` failed:
error: unknown option `detach'
usage: git checkout [options] <branch>
   or: git checkout [options] [<branch>] -- <file>...

template dump and import

  • users can easily dump the templates to an configure file and share to others.
  • other people can load templates from the configure file.

agent -check coredump

最新的master分之agent执行 -check时会core掉

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x48 pc=0x47b4fc]

goroutine 1 [running]:
panic(0x776d80, 0xc420010140)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/open-falcon/falcon-plus/modules/agent/funcs.DeviceMetrics(0x774a20, 0xc42004fd90, 0xc42004fc60)
/home/ry/go/src/github.com/open-falcon/falcon-plus/modules/agent/funcs/dfstat.go:21 +0x14c
github.com/open-falcon/falcon-plus/modules/agent/funcs.CheckCollector()
/home/ry/go/src/github.com/open-falcon/falcon-plus/modules/agent/funcs/checker.go:21 +0x1e6
main.main()
/home/ry/go/src/github.com/open-falcon/falcon-plus/modules/agent/main.go:27 +0x1dc

看了一下代码发现大概是这行:
$HOME/go/src/github.com/open-falcon/falcon-plus/modules/agent/funcs/dfstat.go:21 此时 g.Config()获取的还是初始化为nil的指针。加上 -c 参数执行配置文件一样的效果,而且main里check执行是在ParseConfig之前执行的,所以我以为check是不需要配置文件的。所以感觉这行需要加个nil判断

if g.Config() != nil && len(g.Config().Collector.MountPoint) > 0

agent插件功能开启报错 Setpgid failed, error: permission denied

如果关闭agent plugins 功能,就没有这报错
已使用最新版本编译多次,不管是root 用户还是 普通用户,只要开启agent plugin 功能,就会报错,
同时我也测试了 官方讨论群里上传的agent 一样存在这个问题,但是插件功能是正常的

补充:使用open-falcon-v1 版本的agent 开启plugin 一切正常

agent 日志:
2017/05/11 10:04:02 scheduler.go:59: plugins/monitor_proc/falcon/60_run_process-check-scripts.py running...
2017/05/11 10:04:02 cmd.go:43: Setpgid failed, error: permission denied
2017/05/11 10:04:02 var.go:88: => <Total=1> <Endpoint:agent1, Metric:monitor_proc, Type:GAUGE, Tags:project=falcon,app=tcping_3306.sh, Step:60, Time:1494497042, Value:1>
2017/05/11 10:04:02 var.go:95: <= <Total=1, Invalid:0, Latency=0ms, Message:ok>
2017/05/11 10:04:02 plugin.go:64: <Plugins:[monitor_proc/falcon], Timestamp:1494497042>

谁能帮我查下这个setpgid 是怎么出现的不?

新版本 编译出错

tail ~/.bashrc
export WORKSPACE=/home/work/open-falcon
export GOROOT=/home/work/go
export GOPATH=/home/work/workspace
export PATH=$PATH:$GOROOT/bin:$GOPATH:/bin

echo $GOPATH $GOROOT go version
/home/work/workspace /home/work/go go version go1.8.1 linux/amd64

pwd
/home/work/workspace/src/github.com/open-falcon/falcon-plus

make all
go get -u github.com/rancher/trash
trash -k -cache package_cache_tmp
/bin/bash: trash: command not found
make: *** [trash] Error 127

关于 Dashboard 登录的问题

刚刚入坑,今天安装好之后登录Dashboard发现无须任何认证,直接注册账号即可登录

因为这个是暴露在公网的,感觉有点危险

请问这个有什么认证方式我没找到还是本身就没有认证的?

存储的数据变为科学计数法格式

Doashboard显示的数据出现断点,检查最近的记录,看来收到的数据是科学计数法,但我真是的数据不是科学计数,从日志上看到的发送日志的值为2403528,不知道为什么在query中查到的数据就是科学计数法。

附件:
1
2

alarm界面报错

暂时无法访问,请联系管理员.

error: 'NoneType' object has no attribute 'cursor'

traceback日志如下:
Traceback (most recent call last):
  File "/home/src/github.com/open-falcon/dashboard/env/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/src/github.com/open-falcon/dashboard/env/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/home/src/github.com/open-falcon/dashboard/rrd/view/portal/alarm.py", line 16, in alarm_dash_case_get
    cases, total = EventCase.query(page, limit, endpoint_q, metric_q, status)
  File "/home/src/github.com/open-falcon/dashboard/rrd/model/portal/alarm.py", line 75, in query
    vs = cls.select_vs(where=where, params=params, page=page, limit=limit, order='update_at desc')
  File "/home/src/github.com/open-falcon/dashboard/rrd/model/portal/bean.py", line 90, in select_vs
    rows = cls.select(where=where, params=params, order=order, limit=limit, page=page, offset=offset)
  File "/home/src/github.com/open-falcon/dashboard/rrd/model/portal/bean.py", line 86, in select
    return cls._db.query_all(sql, params)
  File "/home/src/github.com/open-falcon/dashboard/rrd/store.py", line 91, in query_all
    cursor = self.execute(*a, **kw)
  File "/home/src/github.com/open-falcon/dashboard/rrd/store.py", line 56, in execute
    cursor = self.get_conn().cursor()
AttributeError: 'NoneType' object has no attribute 'cursor'

make api时报错

使用make all 编译到api 模块时,报以下错误

github.com/falcon-plus/modules/api

modules/api/main.go:73: cannot use routes (type *"github.com/falcon-plus/vendor/github.com/gin-gonic/gin".Engine) as type *"github.com/open-falcon/falcon-plus/vendor/github.com/gin-gonic/gin".Engine in argument to controller.StartGin
make: *** [api] 错误 2

尝试使用 make clean all 进行编译报错依旧

throw an exception when add a graph to a screen

When I add a graph to a screen, after the submission, an exception is thrown:

暂时无法访问,请联系管理员.

error: {"error":"record not found"}


traceback日志如下:
Traceback (most recent call last):
  File "/data/falcon-plus/dashboard/env/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "/data/falcon-plus/dashboard/env/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/data/falcon-plus/dashboard/rrd/view/dashboard/screen.py", line 176, in dash_graph_add
    timespan, graph_type, method, position)
  File "/data/falcon-plus/dashboard/rrd/model/graph.py", line 66, in add
    return graph_id and cls.get(graph_id)
  File "/data/falcon-plus/dashboard/rrd/model/graph.py", line 39, in get
    raise Exception(r.text)
Exception: {"error":"record not found"}

Actually the graph was added successfully.

There are two spelling faults in EventNote module

Like the title!
In the EventNote.go source file :

type EventNote struct {
ID int64 json:"id" **gorm**:"column:id" //should be "grom"
EventCaseId string json:"event_caseId" **gorm**:"column:event_caseId" //should be "grom"

    Note        string     `json:"note" grom:"note"`
    CaseId      string     `json:"case_id" grom:"case_id"`
    Status      string     `json:"status" grom:"status"`
    Timestamp   *time.Time `json:"timestamp" grom:"timestamp"`
    UserId      int64      `json:"user_id" grom:"user_id"`

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.