Giter Club home page Giter Club logo

Comments (11)

arogarth avatar arogarth commented on August 22, 2024

Same error using config-file....

from vmware_exporter.

Jc2k avatar Jc2k commented on August 22, 2024

Hi @arogarth!

Can you describe your environment a bit? Looks like you are using vCenter rather than raw ESXi access? What versions are you using? I'm guessing you have hosts that arent in a ClusterComputeResource?

(We have seen v0.4.2 working on standalone ESXi and 2 installs using vCenter so i'm trying to triage whats different in your environment).

from vmware_exporter.

arogarth avatar arogarth commented on August 22, 2024

We have two vCenter Server with multiple cluster and ESXi Server. The vCenter hast Version 6.0.0.

from vmware_exporter.

arogarth avatar arogarth commented on August 22, 2024

Commited a small bugfix which work for me - #63

Just a small if to check that folder object has attribute host...

from vmware_exporter.

Jc2k avatar Jc2k commented on August 22, 2024

Looks good. It would be helpful to know what other non-host items can be in dc.hostFolder.childEntity though - could you do me a big favour and do something like:

if not hasattr(folder, 'host'):
    print(folder)

from vmware_exporter.

pryorda avatar pryorda commented on August 22, 2024

@Jc2k The MoB url should allow use to see the possible child entities.

from vmware_exporter.

pryorda avatar pryorda commented on August 22, 2024

I dont know if this is inclusive of all childTypes or not.

image

from vmware_exporter.

pryorda avatar pryorda commented on August 22, 2024

https://www.vmware.com/support/developer/converter-sdk/conv60_apireference/vim.Folder.html

from vmware_exporter.

wvcardoso avatar wvcardoso commented on August 22, 2024

Hi guys,
In my case, I try to use the docker image 'pryorda/vmware_exporter' and no mensagem is shown

curl localhost:9272/metrics?vsphere_host=vcenter1.company

in docker logs shown
vmware_exporter | [2019-02-05 22:33:02.277572+00:00] Start collecting metrics from 'vcenter1.company'
vmware_exporter | [2019-02-05 22:33:02.277893+00:00] Finished collecting metrics from 'vcenter1.company'

How to use in debug mode? I using the latest version (v0.7.0) - https://hub.docker.com/r/pryorda/vmware_exporter/tags

My vcenter is 6.5

from vmware_exporter.

ykuksenko avatar ykuksenko commented on August 22, 2024

Hello all,
I am following up issue #88 here as it was closed and seems to have migrated here. I am seeing basically the same problem and am running vCenter 6.5. This may be a stupid question as I am a new python user. But on line 414 of vmware_exporter.py

 def _collect(dc, node):
            host_inventory = {}
            for folder in node.childEntity:
                if hasattr(folder, 'host'):
                    for host in folder.host:  # Iterate through Hosts in the Cluster
                        host_name = host.summary.config.name.rstrip('.')
                        host_inventory[host._moId] = [
                            host_name,
                            dc.name,
                            folder.name if isinstance(folder, vim.ClusterComputeResource) else ''
                        ]

                if isinstance(folder, vim.Folder):
                    host_inventory.extend(_collect(dc, folder))  # <<<===== THIS LINE !!!!!!!

return host_inventory

'.extend' is being called on a a dictionary. As far as I can find extend isn't something you can do to a dictionary. Was '.update' meant to be used or am I not understanding something? I tried plugging that in and the error went away. I seem to have full output for all sections now. Before this if I enabled only datastores could I get any metrics. I am not sure if I have complete output. I don't fully know what to expect as this is the first time I use this tool.

Thank you.

from vmware_exporter.

kremers avatar kremers commented on August 22, 2024

I think this is obsolete now, since the _collect logic changed as a whole.
Would suggest to close this issue, except someone can still produce an error with the most up to date version.

@arogarth can you please re-test?

from vmware_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.