Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collection failed on vCenter 6.5 #101

Closed
meerkampdvv opened this issue Apr 29, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@meerkampdvv
Copy link

commented Apr 29, 2019

Heay

i just wanted to try the exporter with Docker. I created a Vcenter user and added him to the Administrator Group and i see a successful login in the logs.

The vCenter is version 6.5.0 build 9451637 and Manages 2 ESXI which are clustered.
image

docker run -it --rm -p 9272:9272 -e VSPHERE_USER=Prometheus@vsphere.loc -e VSPHERE_PASSWORD=XXXXX -e VSPHERE_HOST=vcenter -e VSPHERE_IGNORE_SSL=True --name vmware_exporter pryorda/vmware_exporter

[2019-04-29 12:09:28.594283+00:00] Starting web server on port 9272
[2019-04-29 12:09:43.043876+00:00] Start collecting metrics from vcenter
[2019-04-29 12:09:43.043963+00:00] Starting vm metrics collection
[2019-04-29 12:09:43.044022+00:00] Fetching vim.VirtualMachine inventory
[2019-04-29 12:09:43.046407+00:00] Retrieving service instance content
[2019-04-29 12:09:43.049132+00:00] START: _vmware_get_vm_perf_manager_metrics
[2019-04-29 12:09:43.049266+00:00] Starting datastore metrics collection
[2019-04-29 12:09:43.049326+00:00] Fetching vim.Datastore inventory
[2019-04-29 12:09:43.049991+00:00] Starting host metrics collection
[2019-04-29 12:09:43.050515+00:00] Fetching vim.HostSystem inventory
[2019-04-29 12:09:43.135560+00:00] Retrieved service instance content
[2019-04-29 12:09:43.660540+00:00] Fetched vim.VirtualMachine inventory (0:00:00.616470)
[2019-04-29 12:09:43.730291+00:00] Fetched vim.HostSystem inventory (0:00:00.679720)
[2019-04-29 12:09:43.739050+00:00] Fetched vim.Datastore inventory (0:00:00.689666)
[2019-04-29 12:09:43.860414+00:00] Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/vmware_exporter/vmware_exporter.py", line 818, in _async_render_GET
yield self.generate_latest_metrics(request)
twisted.internet.defer.FirstError: FirstError[#2, [Failure instance: Traceback: <class 'twisted.internet.defer.FirstError'>: FirstError[#1, [Failure instance: Traceback: <class 'AttributeError'>: 'vim.Folder' object has no attribute 'datastoreFolder'
/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py:501:errback
/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py:568:_startRunCallbacks
/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py:654:_runCallbacks
/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py:1475:gotResult
--- ---
/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py:1416:_inlineCallbacks
/usr/local/lib/python3.6/site-packages/twisted/python/failure.py:512:throwExceptionIntoGenerator
/usr/local/lib/python3.6/site-packages/vmware_exporter/vmware_exporter.py:392:datastore_labels
/usr/local/lib/python3.6/site-packages/twisted/python/threadpool.py:250:inContext
/usr/local/lib/python3.6/site-packages/twisted/python/threadpool.py:266:
/usr/local/lib/python3.6/site-packages/twisted/python/context.py:122:callWithContext
/usr/local/lib/python3.6/site-packages/twisted/python/context.py:85:callWithContext
/usr/local/lib/python3.6/site-packages/vmware_exporter/vmware_exporter.py:392:
]]
--- ---
/usr/local/lib/python3.6/site-packages/vmware_exporter/vmware_exporter.py:493:_vmware_get_datastores
/usr/local/lib/python3.6/site-packages/vmware_exporter/defer.py:99:parallelize
]]

Unhandled error in Deferred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 501, in errback
self._startRunCallbacks(fail)
File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
self._runCallbacks()
File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 654, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1475, in gotResult
_inlineCallbacks(r, g, status)
--- ---
File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 1416, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/local/lib/python3.6/site-packages/twisted/python/failure.py", line 512, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/local/lib/python3.6/site-packages/vmware_exporter/vmware_exporter.py", line 392, in datastore_labels
result = yield threads.deferToThread(lambda: _collect(dc, dc.datastoreFolder))
File "/usr/local/lib/python3.6/site-packages/twisted/python/threadpool.py", line 250, in inContext
result = inContext.theWork()
File "/usr/local/lib/python3.6/site-packages/twisted/python/threadpool.py", line 266, in
inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
File "/usr/local/lib/python3.6/site-packages/twisted/python/context.py", line 122, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/local/lib/python3.6/site-packages/twisted/python/context.py", line 85, in callWithContext
return func(*args,**kw)
File "/usr/local/lib/python3.6/site-packages/vmware_exporter/vmware_exporter.py", line 392, in
result = yield threads.deferToThread(lambda: _collect(dc, dc.datastoreFolder))
builtins.AttributeError: 'vim.Folder' object has no attribute 'datastoreFolder'

@dannyk81

This comment has been minimized.

Copy link
Collaborator

commented Apr 29, 2019

seems like a dup of #62

@pryorda pryorda referenced this issue May 10, 2019

Closed

Fix folders #104

@pryorda pryorda closed this May 17, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.