b44ef5cb9c
/scrutiny/config/collector.yaml Adding ability to specify host identifier (label), that is updated on every collector run. Can be specified by `host-id` CLI or `COLLECTOR_HOST_ID` env var. Created a config class, interface and associated tests. Created a "TransformDetectedDrives" function, that will allow users to insert drives not detected by Smarctl --scan, ignore drives that they dont want, and override smartctl device type. Added Upsert functionality when registering devices. Replaced "github.com/jinzhu/gorm" with "gorm.io/gorm" (ORM location moved, was using incorrect lib url) Removed machineid library.
10 lines
163 B
Go
10 lines
163 B
Go
package config
|
|
|
|
func Create() (Interface, error) {
|
|
config := new(configuration)
|
|
if err := config.Init(); err != nil {
|
|
return nil, err
|
|
}
|
|
return config, nil
|
|
}
|