示例配置檔案

以下是開發環境中使用的 Bosun 配置檔案的示例:

tsdbHost = localhost:4242
httpListen = :8070
smtpHost = localhost:25
emailFrom = bosun@example.org
timeAndDate = 202,75,179,136
ledisDir = ../ledis_data
checkFrequency = 5m

notification example.notification {
        email = alerts@example.org
        print = true
}

在這種情況下,配置檔案指示 Bosun 應該連線到埠 4242 上的本地 OpenTSDB 例項,偵聽埠 8070 上的請求(在繫結到主機的所有 IP 地址上),使用 localhost SMTP 系統獲取電子郵件,顯示其他時區 ,使用內建 Ledis 而不是外部 Redis 用於系統狀態,預設警報為 5 分鐘間隔。

配置還定義了一個可以分配給警報的 example.notification,它通常包含在配置檔案的末尾(參見示例警報示例)。