Monitor a guest VM on a VMWare host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
mwasc
Posts: 9
Joined: Fri Jan 23, 2015 8:06 am

Monitor a guest VM on a VMWare host

Post by mwasc »

Hello everyone,

I've tried to work with the vmwizard of nagios . I can monitor the esxhosts, but i don't see any guests. I'm using nagios XI 2014R2.4. The version of the vmware wizard is 1.6.2. There were no problems, while installing sdk.

I've installed the plugin as its written in here: http://assets.nagios.com/downloads/nagi ... ios-XI.pdf

I've found this topic, but I don't get my mistake.http://support.nagios.com/forum/viewtop ... =6&t=30755

I'll post now the steps I've seen in the topic before:

If I do this, I'll get all my guests:

Code: Select all

cd /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts
./getguests.pl -H <ip address> -u <username> -p <password>
tail -f /var/log/httpd/error_log:

Code: Select all

[error] [client 172.30.1.21] PHP Notice:  Undefined index: max_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 122, referer: http://172.30.11.118/nagiosxi/
[Mon Jan 26 16:07:56 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined index: avg_execution_time in /usr/local/nagiosxi/html/includes/utils-xmlsysstat.inc.php on line 123, referer: http://172.30.11.118/nagiosxi/
[Mon Jan 26 16:08:09 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined variable: search in /usr/local/nagiosxi/html/admin/users.php on line 154, referer: http://172.30.11.118/nagiosxi/admin/
[Mon Jan 26 16:08:56 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 176, referer: http://172.30.11.118/nagiosxi/includes/components/ccm/xi-index.php
[Mon Jan 26 16:08:56 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined variable: sync_table_status in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 196, referer: http://172.30.11.118/nagiosxi/includes/components/ccm/xi-index.php
[Mon Jan 26 16:09:00 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined index: tfArg1 in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/common_settings.php on line 116, referer: http://172.30.11.118/nagiosxi/includes/components/ccm/?cmd=view&type=host
[Mon Jan 26 16:09:00 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined index: tfArg2 in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/common_settings.php on line 120, referer: http://172.30.11.118/nagiosxi/includes/components/ccm/?cmd=view&type=host
[Mon Jan 26 16:09:00 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined index: tfArg3 in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/common_settings.php on line 124, referer: http://172.30.11.118/nagiosxi/includes/components/ccm/?cmd=view&type=host
[Mon Jan 26 16:09:25 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined variable: ac_needed_js_inject in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 176, referer: http://172.30.11.118/nagiosxi/includes/components/ccm/xi-index.php
[Mon Jan 26 16:09:25 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined variable: sync_table_status in /usr/local/nagiosxi/html/includes/components/ccm/page_templates/ccm_table.php on line 196, referer: http://172.30.11.118/nagiosxi/includes/components/ccm/xi-index.php

Code: Select all

[root@localhost ~]# uname -a
Linux localhost.localdomain 2.6.32-504.3.3.el6.i686 #1 SMP Tue Dec 16 22:55:44 UTC 2014 i686 i686 i386 GNU/Linux

Code: Select all

[root@localhost ~]# cat /etc/*release
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)

Code: Select all

[root@localhost ~]# yum list installed | grep perl
perl.i686                           4:5.10.1-136.el6_6.1              @updates
perl-CPAN.i686                      1.9402-136.el6_6.1                @updates
perl-Class-Accessor.noarch          0.31-6.1.el6                      @base
perl-Class-Singleton.noarch         1.4-6.el6                         @base
perl-Compress-Raw-Zlib.i686         1:2.021-136.el6_6.1               @updates
perl-Compress-Zlib.i686             2.021-136.el6_6.1                 @updates
perl-Config-IniFiles.noarch         2.72-2.el6                        @epel
perl-Config-Tiny.noarch             2.12-7.1.el6                      @base
perl-Crypt-DES.i686                 2.05-9.el6                        @epel
perl-Crypt-Rijndael.i686            1.09-2.el6                        @epel
perl-Crypt-SSLeay.i686              0.57-17.el6                       @base
perl-DBD-MySQL.i686                 4.013-3.el6                       @base
perl-DBI.i686                       1.609-4.el6                       @base
perl-DateTime.i686                  1:0.5300-2.el6                    @base
perl-Digest-HMAC.noarch             1.01-22.el6                       @base
perl-Digest-SHA.i686                1:5.47-136.el6_6.1                @updates
perl-Digest-SHA1.i686               2.12-2.el6                        @base
perl-Error.noarch                   1:0.17015-4.el6                   @base
perl-ExtUtils-MakeMaker.i686        6.55-136.el6_6.1                  @updates
perl-ExtUtils-ParseXS.i686          1:2.2003.0-136.el6_6.1            @updates
perl-HTML-Parser.i686               3.64-2.el6                        @base
perl-HTML-Tagset.noarch             3.20-4.el6                        @base
perl-IO-Compress-Base.i686          2.021-136.el6_6.1                 @updates
perl-IO-Compress-Zlib.i686          2.021-136.el6_6.1                 @updates
perl-IO-Socket-INET6.noarch         2.56-4.el6                        @base
perl-IO-Socket-SSL.noarch           1.31-2.el6                        @base
perl-IO-stringy.noarch              2.110-10.1.el6                    @base
perl-List-MoreUtils.i686            0.22-10.el6                       @base
perl-Mail-IMAPClient.noarch         3.34-1.el6                        @epel
perl-Mail-POP3Client.noarch         2.18-6.el6                        @epel
perl-Math-Calc-Units.noarch         1.07-6.el6                        @epel
perl-Module-Pluggable.i686          1:3.90-136.el6_6.1                @updates
perl-Nagios-Plugin.noarch           0.35-2.el6.rf                     @rpmforge
perl-Net-DNS.i686                   0.65-5.el6                        @base
perl-Net-LibIDN.i686                0.12-3.el6                        @base
perl-Net-SMTP-TLS.noarch            0.12-1.el6.rf                     @rpmforge
perl-Net-SNMP.noarch                5.2.0-4.el6                       @epel
perl-Net-SSLeay.i686                1.35-9.el6                        @base
perl-Params-Validate.i686           0.92-3.el6                        @base
perl-Parse-RecDescent.noarch        1.965-1.el6                       @epel
perl-Pod-Escapes.i686               1:1.04-136.el6_6.1                @updates
perl-Pod-Simple.i686                1:3.13-136.el6_6.1                @updates
perl-SNMP_Session.noarch            1.12-4.el6                        @base
perl-Socket6.i686                   0.23-4.el6                        @base
perl-Test-Harness.i686              3.17-136.el6_6.1                  @updates
perl-Time-HiRes.i686                4:1.9721-136.el6_6.1              @updates
perl-URI.noarch                     1.40-2.el6                        @base
perl-XML-LibXML.i686                1:1.70-5.el6                      @base
perl-XML-NamespaceSupport.noarch    1.10-3.el6                        @base
perl-XML-Parser.i686                2.36-7.el6                        @base
perl-XML-SAX.noarch                 0.96-7.el6                        @base
perl-XML-Simple.noarch              2.18-6.el6                        @base
perl-devel.i686                     4:5.10.1-136.el6_6.1              @updates
perl-libs.i686                      4:5.10.1-136.el6_6.1              @updates
perl-libwww-perl.noarch             5.833-2.el6                       @base
perl-version.i686                   3:0.77-136.el6_6.1                @updates
rrdtool-perl.i686                   1.3.8-7.el6                       @base
This is my 4th try to monitor VMguests, but it never worked. I'll hope you can help me.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor a guest VM on a VMWare host

Post by scottwilkerson »

What happens in the VMWare Wizard when you select the "Monitor a guest VM on the VMWare host " and then after selectign what to monitor click the "Guest Selection" Tab
"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mwasc
Posts: 9
Joined: Fri Jan 23, 2015 8:06 am

Re: Monitor a guest VM on a VMWare host

Post by mwasc »

scottwilkerson wrote:What happens in the VMWare Wizard when you select the "Monitor a guest VM on the VMWare host " and then after selectign what to monitor click the "Guest Selection" Tab
"
Image

I've chosen all Points at "Monitored Metrics".
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor a guest VM on a VMWare host

Post by scottwilkerson »

Can you show the following command results

Code: Select all

ls -la /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts
ls -la /usr/local/nagiosxi/html/includes/configwizards/
ls -la /usr/local/nagiosxi/html/
cat /var/log/httpd/error_log|grep vmware
Also can you confirm that when you ran this
mwasc wrote:

Code: Select all

    cd /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts
    ./getguests.pl -H <ip address> -u <username> -p <password>
You were using the same thing you are entering in the wizard?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Monitor a guest VM on a VMWare host

Post by Box293 »

Also, does your username and password have any special characters like $/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
mwasc
Posts: 9
Joined: Fri Jan 23, 2015 8:06 am

Re: Monitor a guest VM on a VMWare host

Post by mwasc »

scottwilkerson wrote:Can you show the following command results

Code: Select all

ls -la /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts
ls -la /usr/local/nagiosxi/html/includes/configwizards/
ls -la /usr/local/nagiosxi/html/
cat /var/log/httpd/error_log|grep vmware

Code: Select all

 ls -la /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts/
total 28
drwxr-xr-x 2 nagios root 4096 Jan 21 20:11 .
drwxr-xr-x 6 nagios root 4096 Jan 21 20:11 ..
-rwxr-xr-x 1 nagios root 5187 Jan 21 20:11 getguests.pl
-rwxr-xr-x 1 nagios root 5187 Jan 21 20:11 growguest.pl
-rwxr-xr-x 1 nagios root 2033 Jan 21 20:11 NagiosXI-VMWare.sh

Code: Select all

ls -la /usr/local/nagiosxi/html/includes/configwizards/
total 244
drwxr-xr-x 60 nagios nagios 4096 Jan 21 20:11 .
drwxr-xr-x 12 nagios nagios 4096 Jan 21 20:11 ..
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 autodiscovery
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 bpiwizard
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 bulkhostimport
-rwxr-xr-x  1 nagios nagios  179 Jan 21 20:11 configwizardhelper.inc.php
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 dhcp
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 dnsquery
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 domain_expiration
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 email-delivery
drwxr-xr-x  6 nagios root   4096 Jan 21 20:11 esensors-websensor
drwxr-xr-x  6 nagios root   4096 Jan 21 20:11 exchange
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 ftpserver
drwxr-xr-x  2 nagios root   4096 Jan 21 20:11 genericnetdevice
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 ldapserver
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 linux-server
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 linux_snmp
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 macosx
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 mailserver
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 mongodb_database
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 mongodb_server
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 mssql_database
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 mssql_query
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 mssql_server
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 mysqlquery
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 mysqlserver
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 nagioslogserver
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 nagiostats
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 nagiosxiserver
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 ncpa
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 networkanalyzer
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 nrpe
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 oracle_query
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 oracle_serverspace
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 oracle_tablespace
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 passivecheck
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 passiveobject
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 postgresdb
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 postgresquery
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 postgresserver
drwxr-xr-x  2 nagios root   4096 Jan 21 20:11 printer
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 radiusserver
drwxr-xr-x  2 nagios root   4096 Jan 21 20:11 snmp
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 snmp-trap
drwxr-xr-x  2 nagios root   4096 Jan 21 20:11 snmpwalk
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 solaris
drwxr-xr-x  7 nagios root   4096 Jan 21 20:11 ssh-expect
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 sshproxy
drwxr-xr-x  4 nagios root   4096 Jan 21 20:11 switch
drwxr-xr-x  2 nagios root   4096 Jan 21 20:11 tcpudpport
drwxr-xr-x  6 nagios root   4096 Jan 21 20:11 vmware
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 watchguard
drwxr-xr-x  2 nagios root   4096 Jan 21 20:11 website
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 website_defacement
drwxr-xr-x  3 nagios root   4096 Jan 21 20:11 websiteurl
drwxr-xr-x  2 nagios root   4096 Jan 21 20:11 webtransaction
drwxr-xr-x  2 nagios root   4096 Jan 21 20:11 windowsdesktop
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 windowseventlog
drwxr-xr-x  2 nagios root   4096 Jan 21 20:11 windowsserver
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 windowssnmp
drwxr-xr-x  5 nagios root   4096 Jan 21 20:11 windowswmi

Code: Select all

ls -la /usr/local/nagiosxi/html/
total 324
drwxr-xr-x 18 nagios nagios   4096 Jan 21 20:11 .
drwxr-xr-x 10 nagios nagios   4096 Jan 21 20:13 ..
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 about
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 account
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 addons
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 admin
-rwxr-xr-x  1 nagios nagios  24882 Jan 21 20:11 ajaxhelper.php
-rwxr-xr-x  1 nagios nagios   1705 Jan 21 20:11 ajaxproxy.php
drwxr-xr-x  3 nagios nagios   4096 Jan 21 20:11 backend
drwxr-xr-x  3 nagios nagios   4096 Jan 21 20:11 config
-rwxr-xr-x  1 nagios nagios   8801 Jan 21 20:11 config.inc.php
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 dashboards
drwxr-xr-x  4 nagios nagios   4096 Jan 21 20:11 db
drwxr-xr-x  3 nagios nagios   4096 Jan 21 20:11 downloads
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 help
drwxr-xr-x  4 nagios nagios  12288 Jan 21 20:11 images
drwxr-xr-x 12 nagios nagios   4096 Jan 21 20:11 includes
-rwxr-xr-x  1 nagios nagios   1072 Jan 21 20:11 index.php
-rwxr-xr-x  1 nagios nagios  10299 Jan 21 20:11 install.php
-rwxr-xr-x  1 nagios nagios 145836 Jan 21 20:11 login.php
-rw-r--r--  1 nagios nagios   2399 Jan 21 20:11 loginsplash.inc.php
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 perfgraphs
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 reports
-rw-r--r--  1 nagios nagios  20515 Jan 21 20:11 rr.php
-rwxr-xr-x  1 nagios nagios   7314 Jan 21 20:11 suggest.php
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 tools
-rwxr-xr-x  1 nagios nagios   1979 Jan 21 20:11 upgrade.php
drwxr-xr-x  2 nagios nagios   4096 Jan 21 20:11 views

Code: Select all

cat /var/log/httpd/error_log | grep vmware
[Wed Jan 28 11:41:21 2015] [error] [client 172.30.1.21] PHP Notice:  Undefined variable: data in /usr/local/nagiosxi/html/includes/configwizards/vmware/vmware.inc.php on line 492, referer: http://172.30.11.115/nagiosxi/config/monitoringwizard.php
[Wed Jan 28 11:41:21 2015] [error] [client 172.30.1.21] PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/configwizards/vmware/vmware.inc.php on line 492, referer: http://172.30.11.115/nagiosxi/config/monitoringwizard.php
Also can you confirm that when you ran this
mwasc wrote:

Code: Select all

    cd /usr/local/nagiosxi/html/includes/configwizards/vmware/scripts
    ./getguests.pl -H <ip address> -u <username> -p <password>
You were using the same thing you are entering in the wizard?
I've used the same thing. I've tried with the ip adress and the fqdns-name.

Box293 wrote:Also, does your username and password have any special characters like $/
There aren't any special letters in username or password.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor a guest VM on a VMWare host

Post by scottwilkerson »

Actually, just looking at the code, there is a bug in the latest version of the vmware wizard that could cause this exact problem.

I will post a new wizard to this thread once it has been fixed.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor a guest VM on a VMWare host

Post by scottwilkerson »

Upload the new attached Wizard through Admin -> Manage Config Wizards
You do not have the required permissions to view the files attached to this post.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
mwasc
Posts: 9
Joined: Fri Jan 23, 2015 8:06 am

Re: Monitor a guest VM on a VMWare host

Post by mwasc »

Ok, first off all. I'll get something different. :)

Image

But I don't see any servers and if i'll fill in some names of virtual servers, nagios doesn't find the server and i'll get ths message: "ESX3 CRITICAL - VMware machine "" does not exist"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Monitor a guest VM on a VMWare host

Post by scottwilkerson »

Does the user you are connecting with have rights to see all of the Guests?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked