dev: hdd just physical stuff
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kekskurse 2021-09-20 14:06:11 +02:00
parent 7643c96afb
commit a4a6c9c261
Signed by: kekskurse
GPG key ID: 728ACCB59341E7E4
2 changed files with 1 additions and 5 deletions

View file

@ -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]

View file

@ -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