go>> fe>> 返回
项目作者: open-falcon-archive

项目描述 :
Go版本的UIC
高级语言: Go
项目地址: git://github.com/open-falcon-archive/fe.git
创建时间: 2015-05-25T08:07:26Z
项目社区:https://github.com/open-falcon-archive/fe

开源协议:

下载


falcon-fe

鉴于很多用户反馈UIC太难安装了(虽然我觉得其实很容易……),用Go语言重新实现了一个,也就是这个falcon-fe了。

另外,监控系统组件比较多,有不少web组件,比如uic、portal、alarm、dashboard,没有一个统一的地方汇总查看,falcon-fe也做了一些快捷配置,类似监控系统的hao123导航了

安装Go语言环境

  1. cd ~
  2. wget http://dinp.qiniudn.com/go1.4.1.linux-amd64.tar.gz
  3. tar zxvf go1.4.1.linux-amd64.tar.gz
  4. mkdir -p workspace/src
  5. echo "" >> .bashrc
  6. echo 'export GOROOT=$HOME/go' >> .bashrc
  7. echo 'export GOPATH=$HOME/workspace' >> .bashrc
  8. echo 'export PATH=$GOROOT/bin:$GOPATH/bin:$PATH' >> .bashrc
  9. echo "" >> .bashrc
  10. source .bashrc

编译安装fe模块

  1. cd $GOPATH/src/github.com/open-falcon
  2. git clone https://github.com/open-falcon/fe.git
  3. cd fe
  4. go get ./...
  5. ./control build
  6. ./control start

配置介绍

  1. {
  2. "log": "debug",
  3. "company": "MI", # 填写自己公司的名称,用于生成联系人二维码
  4. "http": {
  5. "enabled": true,
  6. "listen": "0.0.0.0:1234" # 自己随便搞个端口,别跟现有的重复了,可以使用8080,与老版本保持一致
  7. },
  8. "cache": {
  9. "enabled": true,
  10. "redis": "127.0.0.1:6379", # 这个redis跟judge、alarm用的redis不同,这个只是作为缓存来用
  11. "idle": 10,
  12. "max": 1000,
  13. "timeout": {
  14. "conn": 10000,
  15. "read": 5000,
  16. "write": 5000
  17. }
  18. },
  19. "salt": "0i923fejfd3", # 搞一个随机字符串
  20. "canRegister": true,
  21. "ldap": {
  22. "enabled": false,
  23. "addr": "ldap.example.com:389",
  24. "baseDN": "dc=example,dc=com",
  25. "bindDN": "cn=mananger,dc=example,dc=com",#允许匿名查询的话,填""值即可
  26. "bindPasswd": "12345678",
  27. "userField": "uid", #用于认证的属性,通常为 uid 或 sAMAccountName(AD)。也可以使用诸如mail的属性,这样认证的用户名就是邮箱(前提ldap里有)
  28. "attributes": ["sn","mail","telephoneNumber"] #数组顺序重要,依次为姓名,邮箱,电话在ldap中的属性名。fe将按这些属性名去ldap中查询新用户的属性,并插入到fe的数据库内。
  29. },
  30. "uic": {
  31. "addr": "root:password@tcp(127.0.0.1:3306)/fe?charset=utf8&loc=Asia%2FChongqing",
  32. "idle": 10,
  33. "max": 100
  34. },
  35. "shortcut": {
  36. "falconPortal": "http://11.11.11.11:5050/", 浏览器可访问的portal地址
  37. "falconDashboard": "http://11.11.11.11:7070/", 浏览器可访问的dashboard地址
  38. "falconAlarm": "http://11.11.11.11:6060/" 浏览器可访问的alarmhttp地址
  39. }
  40. }

设置root账号的密码

该项目中的注册用户是有不同角色的,目前分三种角色:普通用户、管理员、root账号。系统启动之后第一件事情应该是设置root的密码,浏览器访问:http://fe.example.com/root?password=abc (此处假设你的项目访问地址是fe.example.com,也可以使用ip),这样就设置了root账号的密码为abc。普通用户可以支持注册。