ops-hbs

command module
v0.0.0-...-7a70599 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

ops-hbs

基于open-falcon二次开发的hbs组件

特性

  • 使用gorm来操作数据库;
  • 新增运行日志配置, 支持日志滚动;
  • 新增cpu核心绑定、内存阈值配置; 当agent内存达到阈值的50%时, 打印告警信息;当内存达到阈值的100%, 程序直接退出;

编译

it is a golang classic project

cd $GOPATH/src/github.com/fanghongbo/ops-hbs/
./control build
./control start

配置

Refer to cfg.example.json, modify the file name to cfg.json :

{
  "debug": false,
  "log": {
    "log_level": "INFO",
    "log_path": "./logs",
    "log_file_name": "run.log",
    "log_keep_hours": 3
  },
  "database": {
    "host": "127.0.0.1",
    "user": "falcon",
    "password": "test123456",
    "port": 3306,
    "db": "falcon_portal",
    "max_conn": 20,
    "max_idle": 100
  },
  "rpc": {
    "enabled": true,
    "listen": ":6030"
  },
  "http": {
    "enabled": true,
    "listen": ":6031"
  },
  "max_cpu_rate": 0.2,
  "max_mem_rate": 0.3
}

License

This software is licensed under the Apache License. See the LICENSE file in the top distribution directory for the full license text.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
common
g

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL