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

Runtime error after deploying v0.25.0 #473

Closed
aucompbiker opened this issue Nov 1, 2021 · 8 comments · Fixed by #476
Closed

Runtime error after deploying v0.25.0 #473

aucompbiker opened this issue Nov 1, 2021 · 8 comments · Fixed by #476
Assignees
Labels
bug Something isn't working snapshot virtual machine
Milestone

Comments

@aucompbiker
Copy link

Adam,

I deployed v0.25.0 to our Nagios instance, and instantly Nagios spit out this runtime error.

goroutine 1 [running]:
runtime/debug.Stack(0xc1236e, 0x51, 0xc00040ccf8)
runtime/debug/stack.go:24 +0x9f
github.com/atc0005/go-nagios.(*ExitState).ReturnCheckResults(0xc00040e650)
github.com/atc0005/go-nagios@v0.8.0/nagios.go:240 +0xdcf
panic(0xb89c00, 0xc000442240)
runtime/panic.go:971 +0x499
github.com/atc0005/check-vmware/internal/vsphere.SnapshotsCountOneLineCheckSummary(0xbd2b7d, 0x2, 0x1056378, 0x0, 0x0, 0xc0003a3000, 0x6, 0x6, 0xc000370c00, 0x1, ...)
github.com/atc0005/check-vmware/internal/vsphere/snapshots.go:1269 +0x81c
main.main()
github.com/atc0005/check-vmware/cmd/check_vmware_snapshots_count/main.go:436 +0x2f90
@aucompbiker
Copy link
Author

Here's the output from the deployment of v0.25.0.

----------------------------------------
mode of '/tmp/check_vmware_vhw' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_vhw' -> '/usr/lib/nagios/plugins/check_vmware_vhw'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
----------------------------------------
check_vmware_vhw plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_datastore' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_datastore' -> '/usr/lib/nagios/plugins/check_vmware_datastore'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_datastore plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_hs2ds2vms' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_hs2ds2vms' -> '/usr/lib/nagios/plugins/check_vmware_hs2ds2vms'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
----------------------------------------
check_vmware_hs2ds2vms plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_tools' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_tools' -> '/usr/lib/nagios/plugins/check_vmware_tools'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_tools plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_vcpus' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_vcpus' -> '/usr/lib/nagios/plugins/check_vmware_vcpus'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
----------------------------------------
check_vmware_vcpus plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_snapshots_age' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_snapshots_age' -> '/usr/lib/nagios/plugins/check_vmware_snapshots_age'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_snapshots_age plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_snapshots_count' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_snapshots_count' -> '/usr/lib/nagios/plugins/check_vmware_snapshots_count'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_snapshots_count plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_snapshots_size' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_snapshots_size' -> '/usr/lib/nagios/plugins/check_vmware_snapshots_size'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_snapshots_size plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_rps_memory' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_rps_memory' -> '/usr/lib/nagios/plugins/check_vmware_rps_memory'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
----------------------------------------
check_vmware_rps_memory plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_host_memory' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_host_memory' -> '/usr/lib/nagios/plugins/check_vmware_host_memory'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_host_memory plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_host_cpu' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_host_cpu' -> '/usr/lib/nagios/plugins/check_vmware_host_cpu'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_host_cpu plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_vm_power_uptime' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_vm_power_uptime' -> '/usr/lib/nagios/plugins/check_vmware_vm_power_uptime'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
----------------------------------------
check_vmware_vm_power_uptime plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_disk_consolidation' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_disk_consolidation' -> '/usr/lib/nagios/plugins/check_vmware_disk_consolidation'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_disk_consolidation plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_question' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_question' -> '/usr/lib/nagios/plugins/check_vmware_question'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_question plugin deployed ...

----------------------------------------
mode of '/tmp/check_vmware_alarms' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_alarms' -> '/usr/lib/nagios/plugins/check_vmware_alarms'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
----------------------------------------
check_vmware_alarms plugin deployed ...

@aucompbiker
Copy link
Author

The runtime errors are being thrown for the VMware snapshot age, count and size checks for the Military REACH resource pool only. The runtime errors weren't thrown for the library's resource pool. Redeploying the v0.24.0 version fixed the problem.

@aucompbiker
Copy link
Author

Here's the error thrown.

plugin crash/panic detected: runtime error: index out of range [0] with length 0

@atc0005
Copy link
Owner

atc0005 commented Nov 2, 2021

@aucompbiker Thanks for the report. Will dig into this and let you know something when I can. Sorry for the trouble.

@atc0005
Copy link
Owner

atc0005 commented Nov 2, 2021

@atc0005 atc0005 self-assigned this Nov 2, 2021
@atc0005 atc0005 added bug Something isn't working snapshot virtual machine labels Nov 2, 2021
@atc0005 atc0005 added this to the Next Release milestone Nov 2, 2021
@atc0005
Copy link
Owner

atc0005 commented Nov 2, 2021

Thanks for the detailed report, very helpful.

atc0005 added a commit to atc0005/go-nagios that referenced this issue Nov 2, 2021
Emit Performance Data when available AND when `ServiceOutput`
is set. This guards against emitting metrics when there isn't
valid (complete) plugin data to process.

refs GH-98
refs atc0005/check-vmware#473
@atc0005
Copy link
Owner

atc0005 commented Nov 2, 2021

mode of '/tmp/check_vmware_datastore' changed from 0644 (rw-r--r--) to 0755 (rwxr-xr-x)
renamed '/tmp/check_vmware_datastore' -> '/usr/lib/nagios/plugins/check_vmware_datastore'
check-vmware v0.25.0-0-g81deddb (https://github.com/atc0005/check-vmware)
 | 'time'=0ms;;;;
----------------------------------------
check_vmware_datastore plugin deployed ...

The stray perf data emission should be resolved as of #475.

atc0005 added a commit that referenced this issue Nov 2, 2021
Revert the portion of e9d72a6
that removed explicit passing of snapshot thresholds to
reporting funcs and relied upon the first snapshot entry
to provide those details.

refs GH-473
refs GH-451
refs GH-453
@atc0005
Copy link
Owner

atc0005 commented Nov 2, 2021

@aucompbiker Preparing a v0.25.1 release that should resolve the reported issue(s). Please open a new issue if you find any remaining problems.

Thanks again for the detailed report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working snapshot virtual machine
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants