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

    #211
    Originally posted by magajna
    OK, i have read almost all of this post, now i have some questions...

    I have ESXi 5.1u1(free edition), will the scripts posted here work?
    Yes
    Originally posted by magajna
    I also don't have HP environment, can the agents from hp be install on our Intel environment to work this scripts?
    You must use agents from your hardware vendor. On other hardware vendor is used other WBEM class. You can rewrite script /etc/zabbix/zabbix_wbem_vmware.pl
    Originally posted by magajna
    In ESXi 5.1 you have SNMP capabilities, but it will only show you your hardware, can you somehow get used recourse true CIM?
    I don't use SNMP. I use
    WBEM for hardware monitoring
    VMWare API for ESXi monitoring

    Comment

    • steveboyson
      Senior Member
      • Jul 2013
      • 582

      #212
      Dima,
      are you sure to multiply 8192 to get from KBps to bps?
      It's around line 340:

      Code:
      	   if ($units eq "KBps")
      	    {
      	     if (lc($desc) eq "data_transmit_rate" ) {$desc="Network_Data_Transmit_Rate";}
      	     if (lc($desc) eq "data_receive_rate" ) {$desc="Network_Data_Receive_Rate";}
                  $API{$name.".".$desc.".".$type}=$Value[0] * [COLOR="red"]8192[/COLOR]; # in bps
      	    }else{
      		 $API{$name.".".$desc.".".$type}=$Value[0]; # Number 
      		 }
      Or is it from "kilobytes per second" to "bits per second"? Then you're correct.

      But according to https://www.zabbix.com/documentation...fig/items/item the unit "Bps" stands for "bytes per second). So I would expect a multiplier of 1024, not 8192.
      Last edited by steveboyson; 14-10-2013, 18:30.

      Comment

      • steveboyson
        Senior Member
        • Jul 2013
        • 582

        #213
        Okay, according to http://pubs.vmware.com/vsphere-51/in...C269C8529.html
        the unit sent from ESX is "Megabits per second" for network rate".

        Funny thing, all unit labels returned by the Perf API which are measuring a rate are "KBps" or "kiloBytesPerSecond".

        But then again the multiplier seems not to be correct?

        EDIT: Things get even more weird.
        https://www.vmware.com/support/devel..._counters.html states that the rate unit is "kiloBytesPerSecond"

        I'm completely confused now.
        Last edited by steveboyson; 14-10-2013, 19:21. Reason: More investigation.

        Comment

        • dima_dm
          Senior Member
          • Dec 2009
          • 2697

          #214
          Originally posted by steveboyson
          Dima,
          are you sure to multiply 8192 to get from KBps to bps?
          Yes. This counter in KBps.
          counter * 8 ( in bit) * 1000 ( in K) = in bps
          Correct to multiply 8000.
          Last edited by dima_dm; 23-10-2013, 08:43.

          Comment

          • steveboyson
            Senior Member
            • Jul 2013
            • 582

            #215
            Originally posted by dima_dm
            Yes. This counter in KBps.
            counter * 8 ( in bit) * 1000 ( in K) = in bps
            Correct to multiply 8000.
            Thanks, so 8000 is correct and 8192 is not?

            Comment

            • dima_dm
              Senior Member
              • Dec 2009
              • 2697

              #216
              Originally posted by steveboyson
              Thanks, so 8000 is correct and 8192 is not?
              Yes. 8000 is correct.

              Comment

              • steveboyson
                Senior Member
                • Jul 2013
                • 582

                #217
                Dima, thank you and sorry for asking again.

                We are using vSphere 5.1 (soon to be upgraded to 5.5) and the docs say that the unit is "kiloBytesPerSecond":



                I don't think this unit value changed since 4.1 and will ever change.
                Also, a deep inspection in the transmitted counters show also "kiloBytesPerSecond".

                I assume, with "kilo" they mean 2^10 = 1024 and not 10^3 = 1000

                So I think a multiplier of 1024 is correct to achieve "bytes per second".

                What do you think about that?

                Thanks for your help!

                Comment

                • kblackwell
                  Junior Member
                  • Oct 2013
                  • 22

                  #218
                  No problems, just a template question

                  I've gotten this to work. But I have a question about the template.

                  In the directions, you indicate that the template macro {$HOST} is the IP of the ESXi server.

                  If that is the case, I have to create a copy this template for each ESXi host, and I won't be able to use the template on multiple hosts.

                  Is that correct?

                  Kevin

                  Comment

                  • pc99096
                    Senior Member
                    • Oct 2011
                    • 193

                    #219
                    you need to define the macro on the server (host) level, not on the template level.
                    create one host for each esx, assign the same template and define macro separately for each host.

                    Comment

                    • kblackwell
                      Junior Member
                      • Oct 2013
                      • 22

                      #220
                      pc99096,

                      Smart Man.

                      Thanks

                      Comment

                      • kblackwell
                        Junior Member
                        • Oct 2013
                        • 22

                        #221
                        Are others having small issues?

                        I'm wondering if anyone else is having similar issues.

                        I've set both the Server and Agent Timeout values to 30, but periodically if I list the /tmp directory, the vmware file will be of size 0. Not sure if it's a timeout thing or not.

                        Then the item becomes not supported.
                        This is a bit of a problem.

                        Comment

                        • pc99096
                          Senior Member
                          • Oct 2011
                          • 193

                          #222
                          you can always try to run the script manually:
                          ./zabbix_perl_api_vmware.pl VMWARE_IP PASSWORD USERNAME

                          if you want to measure the time it takes to execute, try
                          time ./zabbix_perl_api_vmware.pl VMWARE_IP PASSWORD USERNAME

                          Comment

                          • pc99096
                            Senior Member
                            • Oct 2011
                            • 193

                            #223
                            just found out that after upgrading from esxi 5.1 to 5.5 the perl script stopped working, even after vmware perl sdk upgrade to 5.5

                            Comment

                            • steveboyson
                              Senior Member
                              • Jul 2013
                              • 582

                              #224
                              Hmmm, it works here without any probs in a 5.5+ latest patchset environment.

                              Although we are running the scripts on VMware's vMA ("vSphere Management Assistant") commonly used as a Perl framework appliance for monitoring and backup.

                              Comment

                              • pc99096
                                Senior Member
                                • Oct 2011
                                • 193

                                #225
                                # ./zabbix_perl_api_vmware.pl 10.10.10.10 password root
                                SOAP request error - possibly a protocol issue: <?xml version="1.0" encoding="UTF-8"?>
                                <soapenv:Envelope xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
                                xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                                <soapenv:Body>
                                etc
                                etc



                                instead of returning "0" and creating /tmp/vmware_api_10.10.10.10.txt, it returns
                                a huge XML file and no txt file created. i suspect it might be something with https certificates after the upgrade? or probably some perl incompatible modules?


                                EDIT:
                                this one seemed to help - downgrade libwww-perl

                                # cpan GAAS/libwww-perl-5.837.tar.gz
                                Last edited by pc99096; 24-06-2014, 15:02.

                                Comment

                                Working...