Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update check_vmware_host_memory plugin to log VMs found running on host #378

Closed
atc0005 opened this issue Oct 12, 2021 · 0 comments · Fixed by #381
Closed

Update check_vmware_host_memory plugin to log VMs found running on host #378

atc0005 opened this issue Oct 12, 2021 · 0 comments · Fixed by #381

Comments

@atc0005
Copy link
Owner

atc0005 commented Oct 12, 2021

Relevant block:

hsVMs, hsVMsFetchErr := vsphere.GetVMsFromContainer(ctx, c.Client, true, hostSystem.ManagedEntity)
if hsVMsFetchErr != nil {
log.Error().Err(hsVMsFetchErr).Msg(
"error retrieving VirtualMachines from host",
)
nagiosExitState.LastError = hsVMsFetchErr
nagiosExitState.ServiceOutput = fmt.Sprintf(
"%s: Error retrieving VirtualMachines from host %q",
nagios.StateCRITICALLabel,
cfg.HostSystemName,
)
nagiosExitState.ExitStatusCode = nagios.StateCRITICALExitCode
return
}
log.Debug().Msg("Evaluating host memory usage state")

Add just above line 194.

Related:

@atc0005 atc0005 added this to the Next Release milestone Oct 12, 2021
@atc0005 atc0005 self-assigned this Oct 12, 2021
atc0005 added a commit that referenced this issue Oct 12, 2021
Log VMs associated with the host for troubleshooting purposes.
Tweak wording of nearby log messages to use "on" phrasing
instead of "for" or "from" in an attempt to be consistent
with `LongServiceOutput` phrasing.

refs GH-377
refs GH-378
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant