Skip to content

Commit

Permalink
Use different default spool directory path on Darwin
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-vanyasin committed Dec 10, 2019
1 parent bb4cf7b commit 77b368c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,17 @@ func NewConfig() *Config {

cfg.MinValuableConfig = *(defaultMinValuableConfig())

if runtime.GOOS == "windows" {
switch runtime.GOOS {
case "windows":
cfg.WindowsUpdatesWatcherInterval = 3600
cfg.NetInterfaceExcludeRegex = append(cfg.NetInterfaceExcludeRegex, "Pseudo-Interface")
cfg.CPULoadDataGather = []string{}
cfg.CPUUtilTypes = []string{"user", "system", "idle"}
cfg.VirtualMachinesStat = []string{"hyper-v"}
cfg.JobMonitoring.SpoolDirPath = "C:\\ProgramData\\cagent\\jobmon"
} else {
case "darwin":
cfg.JobMonitoring.SpoolDirPath = "/usr/local/var/lib/cagent/jobmon"
default:
cfg.FSMetrics = append(cfg.FSMetrics, "inodes_used_percent")
}

Expand Down
1 change: 1 addition & 0 deletions example.config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ temperature_monitoring = true # default true
[jobmon]
# Path to spool dir
# spool_dir = 'C:\ProgramData\cagent\jobmon' # Windows
# spool_dir = '/usr/local/var/lib/cagent/jobmon' # MacOS
spool_dir = '/var/lib/cagent/jobmon' # Linux
record_stderr = true # Record the last 4 KB of the error output. Default: true
record_stdout = false # Record the last 4 KB of the standard output. Default: false
Expand Down

0 comments on commit 77b368c

Please sign in to comment.