forked from gmauleon/alertmanager-zabbix-provisioner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
28 lines (21 loc) · 564 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"flag"
"github.com/gmauleon/alertmanager-zabbix-provisioner/provisioner"
log "github.com/sirupsen/logrus"
"os"
)
func main() {
log.SetOutput(os.Stdout)
log.SetLevel(log.InfoLevel)
//log.SetFormatter(&log.JSONFormatter{})
log.SetFormatter(&log.TextFormatter{DisableColors: true})
configFileName := flag.String("config", "./config.yaml", "path to the configuration file")
flag.Parse()
cfg, err := provisioner.ConfigFromFile(*configFileName)
if err != nil {
log.Fatal(err)
}
log.Debug(cfg)
provisioner.New(cfg).Start()
}