使用示例 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_"