-
Notifications
You must be signed in to change notification settings - Fork 11
/
models.go
35 lines (30 loc) · 1007 Bytes
/
models.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
29
30
31
32
33
34
35
package main
import "github.com/fortnoxab/fnxlogrus"
// Config is main application configuration.
type Config struct {
// Comma separated string of networks in 192.168.0.1/24 format
Networks string
// Interval is how often to scan. Default 60m
Interval string `default:"60m"`
// FileSdPath specifies where to put your generated files. Example /etc/prometheus/file_sd/
FileSdPath string
Log fnxlogrus.Config
Port string `default:"8080"`
ExpoterExporterPort string `default:"9999"`
}
// Exporters is a list of addresses grouped by exporter name.
type Exporters map[string][]Address
// Address represents a host:ip to monitor.
type Address struct {
IP string
Hostname string
Subnet string
Port string
Exporter string
MetricsPath string
}
// Group is a prometheus target config. Copied struct from prometheus repo.
type Group struct {
Targets []string `json:"targets"`
Labels map[string]string `json:"labels"`
}