Bug in check_vsphere_xi.py

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
triegel
Posts: 2
Joined: Fri Jan 28, 2022 5:37 pm

Bug in check_vsphere_xi.py

Post by triegel »

Not sure if this is the correct forum to address this, so apologies in advance if not.
In working to utilize the "new" python check for VMware resources I ran into a bit of an edge case with how the check_vsphere_xi.py script handles the password value when consumed from an auth file.

Currently the password value is extracted with:

Code: Select all

password = line.split("=")[1].rstrip()
which won't properly capture the entire password if that password contains a "=" symbol. Patching this to instead be:

Code: Select all

password = line.split("=", 1)[1].rstrip()
should fix the issue.

Just wanted to pass this along, in the very least to help anyone with this very specific issue.
bbahn
Posts: 320
Joined: Thu Jan 12, 2023 5:42 pm

Re: Bug in check_vsphere_xi.py

Post by bbahn »

Hello @trigel,

Good catch! I've made the fix for the username/password splits and will have it out in the next release (not 2024R2 as that's already into QA, but the next release).
Actively advancing awesome answers with ardent alliteration, aptly addressing all ambiguities. Amplify your acumen and avail our amicable assistance. Eagerly awaiting your astute assessments of our advice.
triegel
Posts: 2
Joined: Fri Jan 28, 2022 5:37 pm

Re: Bug in check_vsphere_xi.py

Post by triegel »

Awesome! Thank you @bbahn!