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

Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/modules/check_vmware_esx/host_runtime_info.pm line 717. #177

Open
skupjoe opened this issue Aug 13, 2020 · 7 comments

Comments

@skupjoe
Copy link

skupjoe commented Aug 13, 2020

admin@monsvc-uni-2a:~$ sudo docker exec -t icinga2 /usr/lib/nagios/plugins/check_vmware_esx.pl \
>     -H lax01w01esx01.us-west1.univoip.local \
>     --datacenter lax01m01vc01.us-west1.univoip.local \
>     --authfile /usr/share/icinga2/authfiles/vdb-vc-auth.env \
>     --nosession \
>     --trace=1 \
>     --select=runtime \
>     --subselect=temp
Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/modules/check_vmware_esx/host_runtime_info.pm line 717.
Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/modules/check_vmware_esx/host_runtime_info.pm line 717.
Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/modules/check_vmware_esx/host_runtime_info.pm line 717.
Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/modules/check_vmware_esx/host_runtime_info.pm line 717.
Use of uninitialized value $name in concatenation (.) or string at /usr/lib/nagios/modules/check_vmware_esx/host_runtime_info.pm line 733.
Use of uninitialized value $name in concatenation (.) or string at /usr/lib/nagios/modules/check_vmware_esx/host_runtime_info.pm line 733.
Use of uninitialized value $name in concatenation (.) or string at /usr/lib/nagios/modules/check_vmware_esx/host_runtime_info.pm line 733.
Use of uninitialized value $name in concatenation (.) or string at /usr/lib/nagios/modules/check_vmware_esx/host_runtime_info.pm line 733.
OK: All 4 temperature checks are GREEN.
Ok:  = 44
Ok:  = 39
Ok:  = 29
Ok:  = 23|''=44;;;; ''=39;;;; ''=29;;;; ''=23;;;;

All other checks that come along the default vmware-esx-soap-host monitoring set for Icinga2 work well, but this one produces single quote marks for the perfata.

This in turn causes the Icinga2 Prometheus exporter metrics page (via plugin of which I am also using separately for storage) to fail to render.

Let me know if there is any other info that I can provide thank you

System Info

VMware ESXi, 6.7.0, 16075168
VMware vCenter 6.7.0, 16243230
PowerEdge R730xd
Temps show up from vsphere:
image

@skupjoe
Copy link
Author

skupjoe commented Aug 13, 2020

Similar to issue #158

@Chrisnet46
Copy link

I had the same problem.

In host_runtime_info.pm
line 694

I changed

name => $1,

to

name => $_->name,

Seems to work now

@BaldMansMojo
Copy link
Owner

I can't reproduce.

1 similar comment
@BaldMansMojo
Copy link
Owner

I can't reproduce.

@jhuebner79
Copy link

I can reproduce and @Chrisnet46's proposed solution helps.

Output before the change:

# /usr/lib/nagios/custom-plugins/check_vmware_esx.pl -H redacted.somewhwere.net -u icinga -p redacted -S runtime -s temp
Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/custom-plugins/modules/host_runtime_info.pm line 751.
Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/custom-plugins/modules/host_runtime_info.pm line 751.
Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/custom-plugins/modules/host_runtime_info.pm line 751.
Use of uninitialized value in concatenation (.) or string at /usr/lib/nagios/custom-plugins/modules/host_runtime_info.pm line 751.
Use of uninitialized value $name in concatenation (.) or string at /usr/lib/nagios/custom-plugins/modules/host_runtime_info.pm line 767.
Use of uninitialized value $name in concatenation (.) or string at /usr/lib/nagios/custom-plugins/modules/host_runtime_info.pm line 767.
Use of uninitialized value $name in concatenation (.) or string at /usr/lib/nagios/custom-plugins/modules/host_runtime_info.pm line 767.
Use of uninitialized value $name in concatenation (.) or string at /usr/lib/nagios/custom-plugins/modules/host_runtime_info.pm line 767.
OK: All 4 temperature checks are GREEN.
Ok:  = 33
Ok:  = 21
Ok:  = 44
Ok:  = 46|''=33;;;; ''=21;;;; ''=44;;;; ''=46;;;;

and after:

# /usr/lib/nagios/custom-plugins/check_vmware_esx.pl -H redacted.somewhwere.net -u icinga -p redacted -S runtime -s temp
OK: All 4 temperature checks are GREEN.
Ok: System Board 1 Exhaust Temp = 32
Ok: System Board 1 Inlet Temp = 21
Ok: Processor 2 Temp = 41
Ok: Processor 1 Temp = 46|'System Board 1 Exhaust Temp'=32;;;; 'System Board 1 Inlet Temp'=21;;;; 'Processor 2 Temp'=41;;;; 'Processor 1 Temp'=46;;;;

What do you need to debug? Maybe it's not related to the VMware server or its version but rather to the Perl version on the Icinga2 node? This one here is Debian 10 (yes, I know, we can and should upgrade somewhen not too far in the future - on the other hand there's still support for it until June 30th, 2024) sporting This is perl 5, version 28, subversion 1 (v5.28.1) built for x86_64-linux-gnu-thread-multi.

Thanks for your time and the good work!

@jhuebner79
Copy link

jhuebner79 commented Jan 20, 2023

Forgot to mention: in my case it was line 728 in the file where I had to fix it, we're using the version from the master branch, which as of today is 1.2.5.

@BaldMansMojo BaldMansMojo reopened this Jan 24, 2023
@jhuebner79
Copy link

Thanks for reopening. In the meantime I had the chance to upgrade two satellites to Debian 11, but with the same result.
Now it's This is perl 5, version 32, subversion 1 (v5.32.1) built for x86_64-linux-gnu-thread-multi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants