evoila / collectsphere

Collectd Plugin for VMware vSphere
MIT License
55 stars 9 forks source link

Unhandled python exception in init callback: IndexError: list index out of range #13

Closed Tiger736 closed 7 years ago

Tiger736 commented 8 years ago

Hi glad to be able to use your helper

I am currently experiencing a problem can help solve it?

Some error is displayed when you start

"Unhandled python exception in init callback: IndexError: list index out of range"

Thank you!!

ipsecguy commented 8 years ago

Same here, after fixing SmartConnect to not do Cert Checking.

BTW, I am on ESXI Free as this might be the cause (no performance manager in a non vSphere environment?)

python run-test.py

collectd [INFO]: configure_callback: Loaded config: name=test, host=192.168.0.179, port=80, verbose=True, username=root, password=******, host_metrics=3, vm_metrics=2, inventory_refresh_interval=600
Traceback (most recent call last):
  File "run-test.py", line 58, in <module>
    main()
  File "run-test.py", line 38, in main
    collectsphere.init_callback()
  File "/root/collectsphere/collectsphere.py", line 116, in init_callback
    env = create_environment(config)
  File "/root/collectsphere/collectsphere.py", line 395, in create_environment
    perfI = performanceManager.historicalInterval[0];
IndexError: list index out of range
lkx007 commented 7 years ago

same problem @ipsecguy have you solved this problem??

ipsecguy commented 7 years ago

No, I guess my python and ESXi skills are limited...

prjl commented 7 years ago

Hey, I had the same error. I tried to query the ESXi Host directly, but he needs a valid vSphere Center host.

dennis1987 commented 7 years ago

Hi there, sorry for my late response. Do you have the "System.View" privilege for accessing the historicalInterval in the PerformanceManger? An administration user account should have the access. May the "Modify historical intervals" privilege could help as well.