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

    #46
    Originally posted by Shad0w
    how can i monitor esxi 4.1 via snmp?

    can somebody give me a step-by-step-guide?
    No. Only WBEM and VMWare API
    Originally posted by Shad0w
    @dima_dm: where must i install the perl-api?!
    On Zabbix Server

    Comment

    • dima_dm
      Senior Member
      • Dec 2009
      • 2697

      #47
      Originally posted by dougbee
      I'm trying to run zabbix_perl_api_vmware.pl against vcenter, and am getting:
      I don't test this script with vcenter, only with ESX/ESXi host.

      Comment

      • 753713
        Senior Member
        • Apr 2006
        • 137

        #48
        we can I integrate this Nagios-Script on zabbix?



        can anyone help?
        ______________________________
        Version : 2.0.x
        Server OS: Ubuntu 12.04
        Zabbix Servers: 12
        Monitored Windows Server: ~ 1000
        ______________________________

        Comment

        • Colttt
          Senior Member
          Zabbix Certified Specialist
          • Mar 2009
          • 878

          #49
          ok,

          i install the vsphere toolkit on debian squeeze, i copy the zabbix_perl_api_vmware.pl into /etc/zabbix/externalscripts and change IP, User and password, now when i start this script i become an 1

          Code:
          /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl
          1
          1= error with perl API
          buw how can i fix this?

          and in zabbix i become "not supported"
          Debian-User

          Sorry for my bad english

          Comment

          • dima_dm
            Senior Member
            • Dec 2009
            • 2697

            #50
            Try run
            /usr/lib/vmware-viperl/apps/performance/viperformance.pl --host HOST_NAME --server HOST_IP --countertype net --samples 1 --instance "*" --username root --password PASSWORD
            Is it works?

            Comment

            • Colttt
              Senior Member
              Zabbix Certified Specialist
              • Mar 2009
              • 878

              #51
              yes it works..
              and when i use:

              Code:
              /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl IP-ESX password user
              0
              it works..

              but i dont have any value in zabbix..

              here is an error:
              Code:
              24258:20110519:122831.033 Expression [{12998}#0] for item [26874][csfvirt1:API[{$HOST},{$PASSWORD},{$US
              ERNAME}]] cannot be evaluated: unable to get function value: lastvalue IS NULL for function [12998][csfv
              irt1:API[{$HOST},{$PASSWORD},{$USERNAME}].min(#3)]
              Last edited by Colttt; 19-05-2011, 12:56.
              Debian-User

              Sorry for my bad english

              Comment

              • dima_dm
                Senior Member
                • Dec 2009
                • 2697

                #52
                Do you set Timeout for Zabbix Server and Zabbix Agentd?
                /etc/zabbix/zabbix_server.conf

                Timeout=30
                ….

                /etc/zabbix/zabbix_agentd.conf
                Timeout=30

                Comment

                • Colttt
                  Senior Member
                  Zabbix Certified Specialist
                  • Mar 2009
                  • 878

                  #53
                  ok.. now it works.. i used macros global and not only for the host.. i change the macros in the hostmacros..

                  now i´ve values.. but it don´t refresh the values..
                  it looks like he dont start the zabbix_perl_api_vmware.pl.. when i run it manually i get new values..

                  Code:
                  ls -la /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl
                  -rwxr-xr-x 1 zabbix root 12571 19. Mai 10:18 /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl
                  Code:
                  ### VMWare Perl API Monitoring
                  UserParameter=API[*],/etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl $1 $2 $3
                  [...]
                  ----------------------
                  edit:

                  ok, now it works.. but he dont use the data in the .txt-file..

                  and i become some error..
                  zabbix-agentd.log
                  Code:
                  [...]
                  Use of uninitialized value $name in substitution (s///) at /etc/zabbix/externalscripts/zabbix_perl_api_v
                  mware.pl line 229, <FILE> line 2.
                  Use of uninitialized value $name in hash element at /etc/zabbix/externalscripts/zabbix_perl_api_vmware.p
                  l line 230, <FILE> line 2.
                  Use of uninitialized value in concatenation (.) or string at /etc/zabbix/externalscripts/zabbix_perl_api
                  _vmware.pl line 205.
                  Use of uninitialized value $hash{"648"} in concatenation (.) or string at /etc/zabbix/externalscripts/za
                  bbix_perl_api_vmware.pl line 205.
                  Use of uninitialized value $hash{"6"} in concatenation (.) or string at /etc/zabbix/externalscripts/zabb
                  ix_perl_api_vmware.pl line 205.
                  Use of uninitialized value $hash{"6"} in concatenation (.) or string at /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl line 205.
                  
                  [...]
                  
                  Use of uninitialized value $hash{"93000000"} in concatenation (.) or string at /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl line 205.
                  Use of uninitialized value $hash{"93000000"} in concatenation (.) or string at /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl line 205.
                  Use of uninitialized value $hash{"1"} in concatenation (.) or string at /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl line 205.
                  Use of uninitialized value $hash{"1"} in concatenation (.) or string at /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl line 205.
                  zabbix-server.log
                  Code:
                   4340:20110519:151953.457 Item [SERVER11:API[{$HOST},{$PASSWORD},{$USERNAME}]] error: Get value from ag
                  ent failed: ZBX_TCP_READ() failed [Interrupted system call]
                    4282:20110519:151955.704 Item [SERVER11:Volume.Used] error: Can not evaluate function [last()]: item [
                  SERVER11:Volume.Capacity[{$HOST},{$VOLUME}]] not found
                    4337:20110519:151956.037 Item [SERVER22:API[{$HOST},{$PASSWORD},{$USERNAME}]] error: Get value from ag
                  ent failed: ZBX_TCP_READ() failed [Interrupted system call]
                  Last edited by Colttt; 19-05-2011, 15:13.
                  Debian-User

                  Sorry for my bad english

                  Comment

                  • txalamar
                    Junior Member
                    • Oct 2010
                    • 9

                    #54
                    WBEM problems

                    Hi all,

                    great work that scripts dima_dm!

                    I've got a problem with the wbem script. It exits with 5.

                    the check with wbemcli returns a long string so it might be ok:
                    /usr/bin/wbemcli ei -noverify "https://user:********@myserveripaddress/user/hpq:SMX_FAN"
                    myserveripaddress:5989/user/hpq.....
                    ...CurrentSpeedState=

                    but the script:

                    /etc/zabbix/zabbix_wbem_vmware.pl myserveripaddress ******** user

                    returns that 5.


                    Do you have any idea of what colud be happening?

                    Thx a lot!

                    PD: HP agents are installed but it's not a DL360 G6 but a Blade 460c G6. ¿Can this be the problem? ¿Is your script usefull only aganist that HP model?
                    Last edited by txalamar; 19-05-2011, 15:50.

                    Comment

                    • vvaudan
                      Junior Member
                      Zabbix Certified Specialist
                      • May 2011
                      • 1

                      #55
                      Hello everybody, I have read all post of this topic but I've still a few questions :

                      1. For the procedure you explain, is it working for ESX4i Update 1 ?
                      2. I recently have migration from ESX3.5 to ESX4i Update 1. When I was to ESX3.5, I had just install the zabbix agent. Then, I had created a script that send some values (Datastores spaces mostly) to a zabbix trapper. Since I have upgrated to ESX4i, I'm not able to install the zabbix agent as I did for ESX3.5. My last error when I tried to "./configure --enable-agent" is

                      "Configure: error: in '/root/zabbix-1.8.5'
                      "Configure: error: no acceptable C compiler found in $PATH

                      Actually, I'm not able to install a GCC Compiler because RPM, YUM commands don't exist.

                      So, does anybody know if we could install zabbix agent on that kind of ESXi ?

                      Thanks you for your reply.

                      Comment

                      • dima_dm
                        Senior Member
                        • Dec 2009
                        • 2697

                        #56
                        Originally posted by Shad0w
                        zabbix-server.log
                        Code:
                         4340:20110519:151953.457 Item [SERVER11:API[{$HOST},{$PASSWORD},{$USERNAME}]] error: Get value from ag
                        ent failed: ZBX_TCP_READ() failed [Interrupted system call]
                          4282:20110519:151955.704 Item [SERVER11:Volume.Used] error: Can not evaluate function [last()]: item [
                        SERVER11:Volume.Capacity[{$HOST},{$VOLUME}]] not found
                          4337:20110519:151956.037 Item [SERVER22:API[{$HOST},{$PASSWORD},{$USERNAME}]] error: Get value from ag
                        ent failed: ZBX_TCP_READ() failed [Interrupted system call]
                        Your macros don't work.You must check macros configuration in Zabbix.
                        SERVER22:API[{$HOST},{$PASSWORD},{$USERNAME}]]

                        Comment

                        • dima_dm
                          Senior Member
                          • Dec 2009
                          • 2697

                          #57
                          Originally posted by txalamar
                          but the script:

                          /etc/zabbix/zabbix_wbem_vmware.pl myserveripaddress ******** user

                          returns that 5.


                          Do you have any idea of what colud be happening?
                          Do you see hardware status for all hardware in VMWare client (Configuration->Health Status)?
                          If no, there are problems with HP agents on ESXi hypervisor, you can restart ESXi hypervisor to fix problem.
                          This bug exists in VMware 4.0, and was fixed in VMware 4.1
                          Originally posted by txalamar
                          PD: HP agents are installed but it's not a DL360 G6 but a Blade 460c G6. ¿Can this be the problem? ¿Is your script usefull only aganist that HP model?
                          No, you can use any HP model of server if you have HP agents on ESX/ESXi Hypervisor compatible with this model of hardware.
                          Last edited by dima_dm; 24-05-2011, 09:27.

                          Comment

                          • dima_dm
                            Senior Member
                            • Dec 2009
                            • 2697

                            #58
                            Originally posted by vvaudan
                            Hello everybody, I have read all post of this topic but I've still a few questions :

                            1. For the procedure you explain, is it working for ESX4i Update 1 ?
                            Yes.
                            Originally posted by vvaudan
                            2. I recently have migration from ESX3.5 to ESX4i Update 1. When I was to ESX3.5, I had just install the zabbix agent. Then, I had created a script that send some values (Datastores spaces mostly) to a zabbix trapper. Since I have upgrated to ESX4i, I'm not able to install the zabbix agent as I did for ESX3.5. My last error when I tried to "./configure --enable-agent" is

                            "Configure: error: in '/root/zabbix-1.8.5'
                            "Configure: error: no acceptable C compiler found in $PATH

                            Actually, I'm not able to install a GCC Compiler because RPM, YUM commands don't exist.

                            So, does anybody know if we could install zabbix agent on that kind of ESXi ?

                            Thanks you for your reply.
                            ESXi don't have Service Console.
                            See:

                            You can't install zabbix agent on ESX4i hypervisor. You must use VMWare API and WBEM for monitoring ESX4i hypervisor.

                            Comment

                            • txalamar
                              Junior Member
                              • Oct 2010
                              • 9

                              #59
                              WBEM problems

                              Hi dima_dm,

                              directly connected to the ESXi host (an ESXi 4.1 U1 + HP agents) i can see some sensors but less that I can see through the vCenter console (this host is part of a vSphere cluster). There were less sensors detected before installing HP ESXi Offline Bundle (hp-esxi4.1uX-bundle-1.0a.zip). I have also rebooted the host but no change on zabbix_wbem_vmware.pl. Still getting a 5. I coult eventually exclude this host from the vCenter to try out the script. I'll also look at the script more in deep to see if it is getting something not expected. I already told that the plain wbem client was getting some results.

                              Thanks for all dima_dm,

                              Txa.

                              Comment

                              • txalamar
                                Junior Member
                                • Oct 2010
                                • 9

                                #60
                                WBEM problems

                                Hi dima,

                                I've located the problem. SMX_PowerSupplyModule wasn't returning any value so the $count var was reset to 0. Thus the eval count==0 is true and returns a 5. I've deleted SMX_PowerSupplyModule from the list of keys (commented it out) and now it's generating the temporary text file but with very few values:

                                Temperature_8: 67
                                Temperature_7: 49
                                SMX_NumericSensor_6: 2
                                SMX_NumericSensor_9: 2
                                SMX_NumericSensor_4: 2
                                Temperature_5: 42
                                Array_0: 2
                                Virtual_Fan_at_Platform_backplane_in_Blade=2: 2
                                Temperature_4: 34
                                System_Memory: 2
                                Temperature_6: 46
                                SMX_NumericSensor_3: 2
                                Temperature_1: 40
                                Temperature_2: 40
                                SMX_NumericSensor_1: 2
                                Temperature_9: 21
                                SMX_NumericSensor_0: 2
                                SMX_NumericSensor_2: 2
                                Proc_1: 2
                                SMX_NumericSensor_5: 2
                                SMX_NumericSensor_8: 2
                                SMX_NumericSensor_7: 2
                                Temperature_0: 23
                                Temperature_3: 38
                                Proc_2: 2

                                thats all... This must be due to a change in VmWare hipervisor, like always.

                                Thanks for all,

                                Txa.

                                Comment

                                Working...