Announcement

Collapse
No announcement yet.

ESXi 4.0 Hardware and Software Monitoring VMWare

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by Attunga View Post
    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.
    Add $ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;
    in zabbix_perl_api_vmware.pl

    Comment


      Originally posted by dima_dm View Post
      Add $ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;
      in zabbix_perl_api_vmware.pl
      This worked !!!. Thanks heaps for this.

      Comment


        can anybody add code to the ''zabbix_perl_api_vmware.pl'' to monitor cpu load and the number op CPUs?

        Comment


          Originally posted by Hassan View Post
          can anybody add code to the ''zabbix_perl_api_vmware.pl'' to monitor cpu load and the number op CPUs?
          See in script zabbix_perl_api_vmware.pl
          CpuTotal
          CpuUsed
          Last edited by dima_dm; 03-04-2012, 08:08.

          Comment


            zabbix_get works but via Zabbix server/gui no files are created

            Hi dima_dm,

            I'm struggeling for weeks to get WBEM to work. (I haven't started on the API part besides the pre-requisites and scripts on the correct places).
            I'm using a ML110 with P212 controller so alterations to the script has been made but these were minor.
            running the Zabbix_get -s localhost -k WBEM[Esxi 5 host IP,password,user] works and gives me the output in the correct file in /tmp.
            It does run in the Gui in Zabbix (checked with debuglevel 4 on both the server and agent)
            Running debuglevel 4 with grep on WBEM I see:
            28842:20120409:020431.004 In substitute_simple_macros() data:'WBEM[{$HOST},{$PASSWORD},{$USERNAME}]'
            28842:20120409:020431.005 End substitute_simple_macros() data:'WBEM[192.168.130.10,simple_pwd,root]'
            28842:20120409:020431.005 In evaluate_function() function:'WWESX02:WBEM[192.168.130.10,simple_pwd,root].nodata(14400)'

            **for simple_pwd I don't use any special characters anymore...starting with an ! is not the best option in this case, I already learned.***

            Furthermore, I checked the ownership.
            Where I ran this from the shell it gets the correct permissions like:
            -rw-rw-r-- 1 zabbix zabbix 470 2012-04-09 03:04 vmware_192.168.130.10.txt
            Running
            zabbix_get -s localhost -k Temperature[192.168.130.10,2]
            gives me the output from the file.

            Within the zabbix_agentd.conf I changed the following to overcome differences between 127.0.0.1 and localhost:
            Server=localhost,::ffff:127.0.0.1

            Can you provide me a solution to overcome the fact that no data besides icmpping is getting in Zabbix?

            Thnx in advance!

            Comment


              Check SELINUX configuration.

              Comment


                Thnx for your swift response.

                I'm using Ubuntu 10.4 64bit without SELinux. Apparmor was not restrictive on perl but I stopped and removed it with (just to be sure):
                sudo /etc/init.d/apparmor stop
                sudo update-rc.d -f apparmor remove

                No firewall is active e.g. ufw is off.
                Do you want me to send some screens or something else?

                Comment


                  Originally posted by duncankennedy View Post
                  Do you want me to send some screens or something else?
                  Check:
                  In Zabbix Web interface HOST IP Address = 127.0.0.1 for ALL ESXi hypervisor.

                  Comment


                    zabbix_get works but via Zabbix server/gui no files are created

                    Hi dima_dm,

                    How stupid from me....sorry to bother you with this one, I mixed the $HOST variable IP address with the IP address.
                    Thnx for the help and the great job you are doing!
                    I'v created a ML110G6 + ESXi 5 template.

                    Base Template used is Template_VMWare_HP_DL360_G6_ESXi4.1

                    Create a copy of zabbix_wbem_vmware.pl and call it zabbix_wbem_vmware_ml110.pl
                    Comment the following line and save it:
                    # ,"SMX_PowerSupplyModule"=>["Name","OperationalStatus"]

                    Add the following to the zabbix_agentd.conf:

                    UserParameter=WBEM_ML110[*],/etc/zabbix/zabbix_wbem_vmware_ml110.pl $1 $2 $3
                    UserParameter=Fan_ML110[*],egrep -i "$2:" /tmp/vmware_$1.txt|sed 's/.*\t//'

                    Changes made to the Template_VMWare_HP_DL360_G6_ESXi4.1
                    Removed items:
                    Proc2
                    Powersupply entries (2x) - no substitutions available within CIM.
                    FAN_3
                    FAN_4
                    Temperature 9 until Temperature 27
                    Temperature Celsius 8 until Temperature Celsius 27

                    Removed Macro's from template:
                    {$VOLUME} disk_array

                    Removed Graphs:
                    Temperature 10-19
                    Temperature 20-27

                    Changed items:
                    FAN_1 to Fan CPU Fan_ML110[{$HOST},CPU_FAN_at_Unknown_Physical_Location]
                    FAN_2 to Fan Rear Fan_ML110[{$HOST},REAR_FAN_at_Unknown_Physical_Location]
                    WBEM client status WBEM_ML110[{$HOST},{$PASSWORD},{$USERNAME}]

                    Changed & Added items:
                    Volume.Capacity Array {$VOLUME1} in Byte Volume.Free[{$HOST},{$VOLUME1}]
                    Array_1 Command_Latency.average Array_stat[{$HOST},1,Command_Latency.average]
                    Extra Array's to be made after initial run so Array's can be added.

                    Added value mapping:
                    HP Hardware status
                    0 ⇒ Unknown
                    2 ⇒ OK
                    3 ⇒ Degraded
                    5 ⇒ Predictive Failure
                    6 ⇒ ERROR

                    To be used with:
                    Diskarray
                    Fan CPU
                    Fan Rear
                    Proc 1
                    System_Memory
                    Temperature 0 until 8

                    Extra Macros to be made within the host macros:
                    {$VOLUME1} = <ESXi datastore1 name>
                    {$VOLUME2} = <ESXi datastore2 name>
                    Extra datastores to be added (if applicable) within the macros and item clones to be made accordingly.
                    Attached Files
                    Last edited by duncankennedy; 12-04-2012, 23:25. Reason: Extra template and instructions added ML110G6 + ESXi 5.0

                    Comment


                      Originally posted by duncankennedy View Post
                      Do you want me to post the ML110G6 + ESXi 5 template?
                      Today I finished it.
                      Attach the Template to you post, I will place a link to it in the 1st page of thread.
                      P.S. Can't change 1-st post. Error: Too many links.
                      Last edited by dima_dm; 13-04-2012, 13:42.

                      Comment


                        Hi,

                        I can'nt find an agents for my HP Proliant DL165 G7, anyone have this files?

                        Comment


                          Originally posted by dima_dm View Post
                          See in script zabbix_perl_api_vmware.pl
                          CpuTotal
                          CpuUsed
                          I mean the CPU load average no CPU utilization. CpuUsed gives the CPU utilization in percent.

                          Comment


                            Originally posted by Hassan View Post
                            I mean the CPU load average no CPU utilization. CpuUsed gives the CPU utilization in percent.
                            CpuUsed and CpuTotal gives CPU utilization and total in Нz.
                            Last edited by dima_dm; 16-04-2012, 09:27.

                            Comment


                              we are trying to use zabbix_perl_api_vmware.pl: we've configured both server and agent timeout to max. 30s, but the status file seems not created successfully under /tmp, the log from agentd says:

                              egrep: /tmp/vmware_api_x.x.x.x.txt: No such file or directory

                              and we check there is no such file auto created under /tmp by zabbix. But if we manually run this perl script with user zabbix, the status file created under /tmp no problem at all, and with correct mode.

                              Now we doubt it's caused by its slow running as when we time it, it's 28s, quite close 30s.

                              time /etc/zabbix/zabbix_perl_api_vmware.pl
                              real 0m28.214s
                              user 0m18.322s
                              sys 0m0.093s

                              the zabbix server load is around 0.1 and ESXi hosts load is less than 0.1, we test a couple ESXi hosts, all is more than 25s. Is there any way we can tune it? rather than increasing the zabbix server max. timeout to 60s via modifying the source code?

                              Comment


                                I was having the same issues running on a WAN connection. It took about 2 minutes to complete.
                                For now (in case of the WAN connection) I run a cronjob every 10 minutes to overcome this because changing the timeout larger than 30 seconds will the agent refuse to startup.

                                */10 * * * * /etc/zabbix/externalscripts/zabbix_perl_api_vmware.pl <IP adres> <pwd> <user> >/dev/null 2>&1

                                Beware that the scripts are placed within a different directory in the above listing.

                                Comment

                                Working...
                                X