Page 1 of 1

Error Undefined Subroutine in box293_check_vmware.pl

Posted: Tue Mar 01, 2016 10:46 am
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!

Re: Error Undefined Subroutine in box293_check_vmware.pl

Posted: Tue Mar 01, 2016 5:52 pm
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.

Re: Error Undefined Subroutine in box293_check_vmware.pl

Posted: Tue Mar 01, 2016 6:19 pm
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).

Re: Error Undefined Subroutine in box293_check_vmware.pl

Posted: Wed Mar 02, 2016 12:30 am
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.

Re: Error Undefined Subroutine in box293_check_vmware.pl

Posted: Wed Mar 02, 2016 11:37 am
by rkennedy
Sounds good - are we good to mark this thread as solved, or did you have any questions?