Error Undefined Subroutine in box293_check_vmware.pl

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
PT-support
Posts: 2
Joined: Fri Feb 26, 2016 11:15 am

Error Undefined Subroutine in box293_check_vmware.pl

Post by PT-support »

Hello, all. Box293, thank you for a wonderful plugin!

I believe I've found an error that I'd like to call to your attention.

I have two datastores in a very small vcenter setup with three physical hosts. Here's the version of box293_check_vmware.pl that I have:

Code: Select all

vi-admin@vma:~> ./box293_check_vmware.pl --version
box293_check_vmware Version: 2015-08-03
Here's both datastores that report correctly with the Datastore_Usage check:

Code: Select all

vi-admin@vma:~> ./box293_check_vmware.pl --check Datastore_Usage --server vcenter.my.hidden.tld --name vm-nfs-win
OK: Datastore 'vm-nfs-win' {Free Space: 29,146.9 GB} {Used Space: 507.1 GB} {Capacity: 29,654 GB}|'Free Space'=29146.9GB 'Used Space'=507.1GB 'Capacity'=29654GB [Datastore_Usage]
vi-admin@vma:~> ./box293_check_vmware.pl --check Datastore_Usage --server vcenter.my.hidden.tld --name vm-nfs-lin
OK: Datastore 'vm-nfs-lin' {Free Space: 21,339.9 GB} {Used Space: 8,314.1 GB} {Capacity: 29,654 GB}|'Free Space'=21339.9GB 'Used Space'=8314.1GB 'Capacity'=29654GB [Datastore_Usage]
However when I try to check Datastore_Performance_Overall, the tests go sideways:

Code: Select all

vi-admin@vma:~> ./box293_check_vmware.pl --check Datastore_Performance_Overall --server vcenter.my.hidden.tld --name vm-nfs-win
Undefined subroutine &HostNasVolume::extent called at ./box293_check_vmware.pl line 2666
vi-admin@vma:~> ./box293_check_vmware.pl --check Datastore_Performance_Overall --server vcenter.my.hidden.tld --name vm-nfs-lin
Undefined subroutine &HostNasVolume::extent called at ./box293_check_vmware.pl line 2666
Google literally had 0 hits for that error, which I found surprising as the plugin seems well used, so I guess either I have some odd corner case or some misconfiguration on my part. If any additional info is needed for troubleshooting, I'm glad to provide it.

Thanks!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error Undefined Subroutine in box293_check_vmware.pl

Post by tmcdonald »

Box293 is based out of Australia so his hours are somewhat offset from our normal U.S. support hours, but I've brought this to his attention and he should be along to assist later.
Former Nagios employee
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Error Undefined Subroutine in box293_check_vmware.pl

Post by Box293 »

Are these NFS datastores?

I was looking at this not too long ago and I can't find in vCenter or ESXi metrics for NFS datastores. Hence the error is thrown because they don't exist.

I've been a bit busy of late. I will be releasing an updated the plugin soon (within a month I think) and that will include detection for NFS datastores so it fails with an appropriate message (basically the Datastore Performance checks won't work with NFS datastores).
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
PT-support
Posts: 2
Joined: Fri Feb 26, 2016 11:15 am

Re: Error Undefined Subroutine in box293_check_vmware.pl

Post by PT-support »

Yes, they are NFS datastores. Hopefully somewhere down the line VMware will make it possible to get the metrics for NFS datastores, but until then I'll see if I can get similar metrics from the device holding the datastores to begin with.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Error Undefined Subroutine in box293_check_vmware.pl

Post by rkennedy »

Sounds good - are we good to mark this thread as solved, or did you have any questions?
Former Nagios Employee
Locked