Ad Widget

Collapse

ESXi 4.0 Hardware and Software Monitoring VMWare

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dima_dm
    Senior Member
    • Dec 2009
    • 2697

    #106
    I use RHEL6
    openssl-devel-1.0.0-10.el6_1.5.x86_64
    openssl-1.0.0-10.el6_1.5.x86_64

    perl module
    Class-MethodMaker-2.15
    UUID-0.04
    rpm
    Code:
    perl-DBI-1.609-4.el6.x86_64
    perl-Email-Date-Format-1.002-5.el6.noarch
    perl-MIME-Types-1.28-2.el6.noarch
    perl-XML-SAX-0.96-7.el6.noarch
    perl-libwww-perl-5.833-2.el6.noarch
    perl-Pod-Simple-3.13-119.el6_1.1.x86_64
    perl-Compress-Raw-Zlib-2.023-119.el6_1.1.x86_64
    perl-devel-5.10.1-119.el6_1.1.x86_64
    perl-DBD-MySQL-4.013-3.el6.x86_64
    perl-Digest-SHA1-2.12-2.el6.x86_64
    perl-URI-1.40-2.el6.noarch
    perl-MailTools-2.04-4.el6.noarch
    perl-MIME-Lite-3.027-2.el6.noarch
    perl-Crypt-SSLeay-0.57-16.el6.x86_64
    perl-XML-LibXML-1.70-5.el6.x86_64
    perl-HTML-Parser-3.64-2.el6.x86_64
    perl-Pod-Escapes-1.04-119.el6_1.1.x86_64
    perl-libs-5.10.1-119.el6_1.1.x86_64
    perl-version-0.77-119.el6_1.1.x86_64
    perl-IO-Compress-Base-2.020-119.el6_1.1.x86_64
    perl-IO-Compress-Zlib-2.020-119.el6_1.1.x86_64
    perl-ExtUtils-MakeMaker-6.55-119.el6_1.1.x86_64
    perl-ExtUtils-ParseXS-2.2003.0-119.el6_1.1.x86_64
    perl-Digest-HMAC-1.01-22.el6.noarch
    perl-TimeDate-1.16-11.1.el6.noarch
    perl-SOAP-Lite-0.710.10-2.el6.noarch
    perl-XML-NamespaceSupport-1.10-3.el6.noarch
    perl-HTML-Tagset-3.20-4.el6.noarch
    perl-Module-Pluggable-3.90-119.el6_1.1.x86_64
    perl-5.10.1-119.el6_1.1.x86_64
    perl-Test-Harness-3.17-119.el6_1.1.x86_64
    perl-Compress-Zlib-2.020-119.el6_1.1.x86_64
    Last edited by dima_dm; 25-11-2011, 08:03.

    Comment

    • renato-barbosa
      Junior Member
      • Nov 2011
      • 3

      #107
      Thanks for hoje reply. I'll check these packages and test again.
      Regards.

      Comment

      • Kkweit
        Junior Member
        • Sep 2011
        • 3

        #108
        Hi,

        I'm using Esxi 5.0

        when i run:
        /usr/bin/wbemcli ei -noverify "https://root:[email protected]/root/hpq:SMX_FAN"

        got this error message:

        *
        * /usr/bin/wbemcli: Cim: (3) CIM_ERR_INVALID_NAMESPACE: Invalid namespace
        *

        so i start looking for HP agent. i found "VMware vSphere Hypervisor 5 (ESXi) and Updates" on HP website. downloaded it but get a .iso file. (5.0_Oct_2011_ESXi_HD-USB-SDImgeInstlr_Z7550-00253.iso)

        My questions:
        Did i downloaded the right file ?
        If it's the right one, how do i install it ?


        cheers

        Comment

        • dima_dm
          Senior Member
          • Dec 2009
          • 2697

          #109
          Originally posted by Kkweit
          so i start looking for HP agent. i found "VMware vSphere Hypervisor 5 (ESXi) and Updates" on HP website. downloaded it but get a .iso file. (5.0_Oct_2011_ESXi_HD-USB-SDImgeInstlr_Z7550-00253.iso)
          You can use ESXi from HP (initial install) or HP ESXi Offline Bundle for installed ESXi. Download page
          VMware from HP ProLiant Server VMware Support Matrix
          Last edited by dima_dm; 30-11-2011, 07:34. Reason: Add URL

          Comment

          • Kkweit
            Junior Member
            • Sep 2011
            • 3

            #110
            I'm using a HP ProLiant DL180 G5
            it's already running so i can't use the 1st link.
            it seems that there's no Bundle for Esxi 5 working on HP ProLiant DL 180 G5.

            Don't no know what to do. Any clue ?

            Comment

            • dkmark
              Junior Member
              • Jan 2012
              • 4

              #111
              Dear dima_dm,

              When I try run ./zabbix_perl_api_vmware.pl IP Password User I see "1".
              But when I run /usr/lib/vmware-vcli/apps/performance/viperformance.pl --host HostName --server IP --countertype net --samples 1 --instance "*" --username USER --password PSW I see:
              "Counter: Broadcast receives
              Instance :
              Description: Number of broadcast packets received during the sampling interval
              Units: Number
              Sample info : 20,2012-01-19T14:47:00Z
              Value: 59
              ....
              "
              Can you help me investigate that.

              Thanks.

              Comment

              • dima_dm
                Senior Member
                • Dec 2009
                • 2697

                #112
                Originally posted by dkmark
                When I try run ./zabbix_perl_api_vmware.pl IP Password User I see "1".
                1 - error with perl API
                Do you see any data in file /tmp/vmware_api_IP.txt?
                Add print operator in script to see detail.
                Code:
                # Login to Virtual Center service:
                my $retval =Vim::login(service_url => $service_url, user_name => $username, password => $password);
                      };
                      if ($@)
                        {
                          if ($@ =~ /incorrect user name or password/) {
                            $error_code=3;
                         } else {
                [B]print "test $@\n";[/B]
                           $error_code=1;
                         }
                       }

                Comment

                • dkmark
                  Junior Member
                  • Jan 2012
                  • 4

                  #113
                  dima_dm,

                  I don't see "vmware_api_IP.txt" in /tmp/ .
                  When ' print "test $@\n"; ' was added I see:
                  Code:
                  test Server version unavailable at 'https://MyIP:443/sdk/vimService.wsdl' at /usr/lib/perl5/5.8.8/VMware/VICommon.pm line 545.
                  
                  1

                  Comment

                  • dima_dm
                    Senior Member
                    • Dec 2009
                    • 2697

                    #114
                    Originally posted by dkmark
                    dima_dm,

                    I don't see "vmware_api_IP.txt" in /tmp/ .
                    When ' print "test $@\n"; ' was added I see:
                    Code:
                    test Server version unavailable at 'https://MyIP:443/sdk/vimService.wsdl' at /usr/lib/perl5/5.8.8/VMware/VICommon.pm line 545.
                    
                    1
                    check rpm openssl-devel

                    In order to bypass the server certificate validation, set PERL_LWP_SSL_VERIFY_HOSTNAME environnement variable to 0.
                    export PERL_LWP_SSL_VERIFY_HOSTNAME=0
                    Last edited by dima_dm; 20-01-2012, 16:00.

                    Comment

                    • dkmark
                      Junior Member
                      • Jan 2012
                      • 4

                      #115
                      Originally posted by dima_dm
                      check rpm openssl-devel

                      In order to bypass the server certificate validation, set PERL_LWP_SSL_VERIFY_HOSTNAME environnement variable to 0.
                      export PERL_LWP_SSL_VERIFY_HOSTNAME=0
                      Thanks a lot.
                      Code:
                      export PERL_LWP_SSL_VERIFY_HOSTNAME=0
                      That fixed my problem.

                      Comment

                      • Attunga
                        Junior Member
                        • Feb 2012
                        • 8

                        #116
                        I am having an annoying problem with this one ..

                        The WBEM side of things seems to be working. I get the vmware_IP.txt written for a couple of hosts. I am having problems with the API side of things where nothing is written.

                        If I run the command manually:

                        /etc/zabbix/zabbix_perl_api_vmware.pl [IP] [password] [username]

                        I get a return of 0 and text written into the /tmp directory. Zabbix then picks up on the various items - so that side works well.

                        The problem is that Zabbix just does not seem to be writing this text file. I have tested it logged in as both root and Zabbix and manually the command always works, but not automatically.

                        I can't see any error messages in the logs so I am not sure where I can look now. It almost seems as if something is not starting the api scripts.

                        I have gone over the configs, double checked the entries in the zabbix-agentd.conf and all other locations.

                        Any other things to check ? What actually causes the script to run in Zabbix ? and why would the WBEM script run without a problem and nothing is seen on the API script.

                        Any help much appreciated.

                        Comment

                        • dima_dm
                          Senior Member
                          • Dec 2009
                          • 2697

                          #117
                          Originally posted by Attunga
                          Any other things to check ? What actually causes the script to run in Zabbix ? and why would the WBEM script run without a problem and nothing is seen on the API script.
                          Check permissions on file
                          ls -l vmware_api_172.16.38.106.txt
                          -rw-rw-r-- 1 zabbix zabbix 2218 Feb 14 14:02 vmware_api_172.16.38.106.txt

                          Comment

                          • Attunga
                            Junior Member
                            • Feb 2012
                            • 8

                            #118
                            Thanks heaps for the reply. This is what is seen when I run the file manually as the zabbix user.

                            Code:
                            zabbix@zabbix:/tmp$ ls -al vmware_api_x.x.x.x.txt 
                            -rw-rw-r-- 1 zabbix zabbix 3310 2012-02-15 11:06 vmware_api_x.x.x.x.txt
                            I have tried removing all existing files just in case it did have something to do with the files not being able to be overwritten.

                            The only other thing is that I had to use the "export PERL_LWP_SSL_VERIFY_HOSTNAME=0" suggestion to get things working manually the other day. I did set it as global, and it seems to work when logged in as Zabbix.

                            Yesterday I turned on further logging and I have now found these lines in the logs. Does this indicate that it is getting a 1 result when zabbix is trying to run the command ? Could this be caused by the environment variable above ?

                            Code:
                            26172:20120215:111614.242 Processing request.
                             26172:20120215:111614.242 Requested [system.cpu.load[,avg1]]
                             26172:20120215:111614.242 Sending back [0.020000]
                             26171:20120215:111614.243 Processing request.
                             26171:20120215:111614.243 Requested [API[x.x.x.x,pass,username]]
                             26171:20120215:111614.243 In zbx_popen() command:'/etc/zabbix/zabbix_perl_api_vmware.pl x.x.x.x pass username'
                             26171:20120215:111614.244 End of zbx_popen():7
                              6821:20120215:111614.245 zbx_popen() executing script
                             26174:20120215:111614.280 In send_buffer() host:'127.0.0.1' port:10051 values:0/100
                             26174:20120215:111614.280 End of send_buffer():SUCCEED
                             26174:20120215:111614.281 Sleeping for 1 second(s)
                            
                             26171:20120215:111614.502 In zbx_waitpid()
                             26171:20120215:111614.502 zbx_waitpid() exited, status:0
                             26171:20120215:111614.502 End of zbx_waitpid():6821
                             26171:20120215:111614.502 Run remote command [/etc/zabbix/zabbix_perl_api_vmware.pl x.x.x.x pass username] Result [1] [1]...
                             26171:20120215:111614.502 Sending back [1]
                             26168:20120215:111614.579 In update_cpustats()
                             26168:20120215:111614.579 End of update_cpustats()
                             26172:20120215:111614.630 Processing request.

                            Comment

                            • Attunga
                              Junior Member
                              • Feb 2012
                              • 8

                              #119
                              I just put the

                              Code:
                              print "test $@\n";
                              into the code and received the same result as the person above.


                              Code:
                              [test Server version unavailable at 'https://x.x.x.x:443/sdk/vimService.wsdl' at /usr/share/perl/5.12/e/VICommon.pm line 545.
                              So it seems to be the:

                              export PERL_LWP_SSL_VERIFY_HOSTNAME=0

                              I on Ubuntu Server 11.10. I put it in /etc/environment which then seems to be recognised by users I log in with but not zabbix.

                              Another thing I tried is to put

                              $ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;

                              in

                              /usr/lib/vmware-vcli/apps/general/connect.pl

                              With no success.

                              Comment

                              • Attunga
                                Junior Member
                                • Feb 2012
                                • 8

                                #120
                                And the strange thing, if I run the commands manually from a script, being run under crontab, under the zabbix user account, they run no problems at all.

                                Files are written to /tmp with the zabbix username and they have the correct data.

                                Comment

                                Working...