使用示例 scollector.toml 文件进行安装

适用于 Windows,Mac 和 Linux 的 Scollector 二进制文件可从 Bosun 发行页面获得 ,并可保存到 / opt / scollector /C:\ Program Files \ scollector \ 。该 Scollector 配置文件使用 TOML v0.2.0指定各种设置,默认为被命名 scollector.toml 在同一文件夹中的二进制文件。配置文件是可选的,仅在需要覆盖默认值或包含激活特定收集器的设置时才需要。

#Where to send metrics. If omitted the default is bosun:80. 
#Config file setting can also be overridden using -h bosunhostname on command line 
Host = "mybosunserver.example.com:8080"

#Optional folder where to find external collector scripts/binaries
ColDir  = 'C:\Program Files\scollector\collectors'

#Number of data points to include in each batch. Default is 500, should be set higher if you are sending a lot of metrics.
BatchSize = 5000

然后,你可以将 Scollector 安装为服务,也可以通过以下方式手动运行:

#Override default configuration file location
scollector -conf /path/to/myconfig.toml

#List all built-in collectors
scollector -l

#-p will print metrics to the screen instead of sending to Bosun. 
#-f "..." will only run specific collectors. Add DisableSelf = true to toml file to exclude scollector.* self metrics
scollector -p -f "c_cpu_windows,c_network_"