Ad Widget

Collapse

VmBix 1.1.1 released

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sgiaicheca
    Junior Member
    • Feb 2014
    • 18

    #16
    zabbix_api is already installed

    zabbix-api in /usr/lib/python2.6/site-packages

    perhaps python version ?

    Comment

    • tatapoum
      Senior Member
      • Jan 2014
      • 185

      #17
      What does it say when you try that in python interactive console?
      Code:
      >>> from zabbix_api import ZabbixAPI
      >>> zapi = ZabbixAPI(server = "http://yourzabbixserver/api_jsonrpc.php", path = "")
      >>> zapi.login("youruser","yourpassword")
      >>> print zapi.api_version()
      2.2.3
      >>>

      Comment

      • sgiaicheca
        Junior Member
        • Feb 2014
        • 18

        #18
        i've uploaded my python version to 2.7.5 and uninstall and reinstall zabbix-api

        print zapi.api_version() =>>>> 2.2.1

        script stop on VMGROUP => cannot resolve VM group

        Comment

        • tatapoum
          Senior Member
          • Jan 2014
          • 185

          #19
          You must define a Zabbix group to put the VMs into. It must exist. And a zabbix template to link the VMs to.

          Comment

          • sgiaicheca
            Junior Member
            • Feb 2014
            • 18

            #20
            when you say Zabbix group, it's host groups

            Comment

            • tatapoum
              Senior Member
              • Jan 2014
              • 185

              #21
              Yes, have a look at the script, you must define :
              - a Zabbix hostgroup to put the discovered VMs into
              - a Zabbix template to link the discovered VMs to (for example "Template VmBix VM")
              I also define a Zabbix proxy, because it sets my environment. If you don't use it, you can just remove the proxy part from the script.

              This script wasn't intended to be public. It's just a basic script used in our environment. Use it as a basis for yours.

              Comment

              • sgiaicheca
                Junior Member
                • Feb 2014
                • 18

                #22
                i've already understand that your discovery script is not to be implemented as a public script, but it looks useful to discover VMs

                I continue to analyze why i've got this error, as i've configured all parameters for my vmware architecture, in log file i've always same errors

                Thanks again for your help

                Comment

                • tatapoum
                  Senior Member
                  • Jan 2014
                  • 185

                  #23
                  what's the error ? Could you post the ouput on pastebin or something ?

                  Comment

                  • sgiaicheca
                    Junior Member
                    • Feb 2014
                    • 18

                    #24
                    Here is my errror

                    ERROR - vmbix-discovery[16378]: Cannot resolve VM group

                    I've tried with hosts_group id instead of Name but same error

                    HostGroup Name is VMs with Linked Template VmBix VM
                    vmbix-discovery =>
                    VMGROUP = "VMs"
                    VMTEMPLATE = "Template VmBix VM"

                    Comment

                    • roose
                      Junior Member
                      • Mar 2013
                      • 9

                      #25
                      Monitoring multiple ESX hosts

                      Hi tatapoum,

                      If I need to monitor multiple ESX hosts, should I put additional info, e.g. username/password/URLs, for the other hosts in the config file? Or should I run multiple vmbix daemons with different config files for each of the ESX hosts I need to monitor?

                      I can't seem to find the instructions for this. Thanks.

                      Comment

                      • tatapoum
                        Senior Member
                        • Jan 2014
                        • 185

                        #26
                        Hi, in fact, vmbix connects to the vCenter. So you need to provide credentials to the vCenter server, with the minimum permissions to query the API.

                        Comment

                        • roose
                          Junior Member
                          • Mar 2013
                          • 9

                          #27
                          Oh, ok. I will try it then. Thanks.

                          Comment

                          • Tristan
                            Senior Member
                            • Feb 2008
                            • 110

                            #28
                            Originally posted by tatapoum
                            Hi, in fact, vmbix connects to the vCenter. So you need to provide credentials to the vCenter server, with the minimum permissions to query the API.
                            Hello,

                            But what if i have multiple single esx hosts, not conntected to a. Vcenter?

                            Comment

                            • waclaw
                              Junior Member
                              • Nov 2012
                              • 5

                              #29
                              Hi,
                              how to read latency information for datastores per ESXi host? I tried this:
                              Code:
                              zabbix_get -s 127.0.0.1 -p 12060 -k "esx.counter[<ESXi_host_name>,datastore.totalWriteLatency,<Datastore_name>,900]"
                              but vmbix get only "No returned value"

                              Ok, I found solution, instead Datasotre_name should by Datastrore_UUID.
                              Last edited by waclaw; 07-07-2014, 13:35.

                              Comment

                              • tatapoum
                                Senior Member
                                • Jan 2014
                                • 185

                                #30
                                You found the solution. You need to specify the datastore ID (like naa.xxxxx). I don't know why, but the aggregated instance (here, the aggregation of all the datastores) returns nothing. So this query doesn't work in my setup :
                                Code:
                                zabbix_get -s 127.0.0.1 -p 12060 -k "esx.counter[<ESXi_host_name>,datastore.totalWriteLatency,,900]"
                                If you're interested, I have compiled a 1.1.4 version, which adds methods to get the list of instances for a specific counter. Like :

                                Code:
                                zabbix_get -s 127.0.0.1 -p 12060 -k "esx.counter.instances[<ESXi_host_name>,datastore.totalLatency]"
                                105 datastore.totalLatency naa.XXXXXXXXXXXXXXXX
                                105 datastore.totalLatency naa.YYYYYYYYYYYYYYYY
                                105 datastore.totalLatency naa.ZZZZZZZZZZZZZZZZ
                                It also includes better error handling.

                                I can put it on my download page if needed.

                                Comment

                                Working...