add MEM_CALC env var

This commit is contained in:
Henry Dollman
2024-10-05 15:29:27 -04:00
parent c407fe9af0
commit af4877ca30
2 changed files with 15 additions and 4 deletions

View File

@@ -13,6 +13,7 @@ import (
type Agent struct {
debug bool // true if LOG_LEVEL is set to debug
memCalc string // Memory calculation formula
fsNames []string // List of filesystem device names being monitored
fsStats map[string]*system.FsStats // Keeps track of disk stats for each filesystem
netInterfaces map[string]struct{} // Stores all valid network interfaces
@@ -26,6 +27,7 @@ type Agent struct {
func NewAgent() *Agent {
return &Agent{
sensorsContext: context.Background(),
memCalc: os.Getenv("MEM_CALC"),
}
}