Recommendation for VMware Wizard bug

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

Recommendation for VMware Wizard bug

Post by TSCAdmin »

While going through the VMware wizard, I ran into a couple problems created by "invalid characters" in the name of the virtual machine guest.

Example guest name (which is perfectly valid in VMware):

Code: Select all

gr-chi-svv-0036_(Dev_Image_2.5.4)
The problems that occur are:
1) When the guest name is used as part of the service description, it generates an error (due to the parens)
2) When the check_esx3.pl script is executed, it fails with an error (again, due to the parens)

Recommendations:
1) In the guest name portion of the service description, do a character translation of invalid characters for nagios
2) In the check script, wrap the guest name in double quotes
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Recommendation for VMware Wizard bug

Post by mmestnik »

Thank you for bringing this up. It's getting done.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Recommendation for VMware Wizard bug

Post by mmestnik »

Though keep in mind that say, "a(" and "a)" could both exist on VMWare, but then not in Nagios. A better example would be accents on an 'a'.

We would fix one bug to create another.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Recommendation for VMware Wizard bug

Post by mmestnik »

I remember now, you can change the check description and in the background(though it dosen't show in the interface) the VM name is still keept. As for the check command I'm pushing a fix for that, as you suggested, and I'll add a test that will send a error if the service name has not been changed.

As for automagically changing the names to support that I'd have to change the interface to include the real names and that means line wrapping something. I'll look into it.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Recommendation for VMware Wizard bug

Post by mmestnik »

You can be the first to try this out, the php will run is about all I tested. Reverting would be as easy as uploading a "?working?" wizard.
You do not have the required permissions to view the files attached to this post.
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

Re: Recommendation for VMware Wizard bug

Post by TSCAdmin »

True enough ... I haven't tested the check_esx3.pl script to verify it works with the single quotes for explicit strings, so obviously that should probably be a first step. I did test the double quotes, which fixed my particular issue. :)
TSCAdmin
Posts: 155
Joined: Wed Apr 14, 2010 3:00 pm
Location: India

Re: Recommendation for VMware Wizard bug

Post by TSCAdmin »

Single quotes do work ... easiest way to apply the fix is via the templates file for new installations.

vmware/templates/vmware.cfg

Code: Select all

--- vmware.cfg  2010-05-27 13:10:42.000000000 -0400
+++ vmware.cfg 2010-07-22 15:36:50.000000000 -0400
@@ -30,6 +30,6 @@
 # '' command definition
 define command{
        command_name    check_esx3_guest
-       command_line    $USER1$/check_esx3.pl -H $HOSTADDRESS$ -f $ARG1$ -N $ARG2$ -l $ARG3$$ARG4$
+       command_line    $USER1$/check_esx3.pl -H $HOSTADDRESS$ -f $ARG1$ -N '$ARG2$' -l $ARG3$$ARG4$
        }
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: Recommendation for VMware Wizard bug

Post by mmestnik »

What's the rational behind using single quotes VS double? I know single quotes will allow more, in some cases, strings to match. I did double assuming ppl would do things like "Mike's SNMP trap test" Instead of 'This box is a "down".'.
I'm fine with installations changing this to taste, but I may be persuaded to change the default.
Locked