dev: hdd just physical stuff
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
7643c96afb
commit
a4a6c9c261
2 changed files with 1 additions and 5 deletions
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/rs/zerolog/log"
|
||||
"gopkg.in/yaml.v2"
|
||||
"http-server-status/internal/pkg/checks"
|
||||
|
@ -23,7 +22,6 @@ type Config struct {
|
|||
}
|
||||
|
||||
func readConfig() {
|
||||
fmt.Println(os.Args)
|
||||
filename := "/etc/http-server-status/config.yml"
|
||||
if len(os.Args) > 1 {
|
||||
filename = os.Args[1]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package checks
|
||||
|
||||
import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/shirou/gopsutil/disk"
|
||||
)
|
||||
|
||||
|
@ -15,8 +14,7 @@ type HDD struct {
|
|||
|
||||
func (h HDD) Execute() (ok bool, data interface{}, err error) {
|
||||
success := true
|
||||
parts, _ := disk.Partitions(true)
|
||||
log.Debug().Int("max_percent", h.Config.MaxPercent).Msg("Execute HDD Check")
|
||||
parts, _ := disk.Partitions(false)
|
||||
usage := make(map[string]float64)
|
||||
for _, p := range parts {
|
||||
device := p.Mountpoint
|
||||
|
|
Loading…
Reference in a new issue