pingcheck fix
This commit is contained in:
parent
5917d03374
commit
450ffe15c5
2 changed files with 4 additions and 0 deletions
|
|
@ -307,6 +307,7 @@ func (a *Agent) EventLogCheck(data rmm.Check, r *resty.Client) {
|
|||
}
|
||||
|
||||
func (a *Agent) SendPingCheckResult(payload rmm.PingCheckResponse, r *resty.Client) {
|
||||
payload.AgentID = a.AgentID
|
||||
_, err := r.R().SetBody(payload).Patch("/api/v3/checkrunner/")
|
||||
if err != nil {
|
||||
a.Logger.Debugln(err)
|
||||
|
|
|
|||
3
main.go
3
main.go
|
|
@ -186,7 +186,10 @@ func setupLogging(level, to *string) {
|
|||
logFile, _ = os.OpenFile(filepath.Join(os.Getenv("ProgramFiles"), "TacticalAgent", "agent.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0664)
|
||||
case "linux":
|
||||
logFile, _ = os.OpenFile(filepath.Join("/var/log/", "tacticalagent.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0664)
|
||||
case "darwin":
|
||||
logFile, _ = os.OpenFile(filepath.Join("/Library/Logs", "tacticalagent.log"), os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0664)
|
||||
}
|
||||
|
||||
log.SetOutput(logFile)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue