[Check_mk (english)] Eroor in agent_vsphere in 1.2.6b7

checkmk checkmk at oppenberg.eu
Mon Feb 2 19:57:06 CET 2015


fixed in http://mathias-kettner.de/check_mk_werks.php?werk_id=1931&HTML=yes

Am 30.01.2015 13:35, schrieb checkmk:
> Hello everyone
>
> i get the following error when query a vCenter 5.0 with agent installed:
>
> Traceback (most recent call last):
>   File "/omd/sites/abc/share/check_mk/agents/special/agent_vsphere", 
> line 706, in <module>
>     key, name, total, used = 
> get_pattern("<licenseKey>(.*?)</licenseKey>.*?<name>(.*?)</name><total>(.*?)</total><used>(.*?)</used>", 
> host)[0]
> IndexError: list index out of range
>
>
> The error not occours when i comment out the following lines:
>
>         ###########################
>         # Licenses
>         ###########################
>         reply_code, reply_msg, reply_headers, licenses_response = 
> query_server(telegram_list["licenseassigned"])
>         license_hosts = get_pattern('<returnval>(.*?)</returnval>', 
> licenses_response)
>         licenses = {}
>         for host in license_hosts:
>             key, name, total, used = 
> get_pattern("<licenseKey>(.*?)</licenseKey>.*?<name>(.*?)</name><total>(.*?)</total><used>(.*?)</used>", 
> host)[0]
>             # We merge all entries with the same name, duplicate keys 
> are ignored since they provide the same data
>             licenses.setdefault(name, {"used_keys": [], "total": 0, 
> "used": 0})
>             if key not in licenses[name]["used_keys"]:
>                 licenses[name]["total"] += int(total)
>                 licenses[name]["used"]  += int(used)
>                 licenses[name]["used_keys"].append(key)
>
>         print "<<<esx_vsphere_licenses:sep(9)>>>"
>         for license, values in licenses.items():
>             print "%s\t%s %s" % (license, values["used"], values["total"])
>
>
> Any Ideas ?
>
>
>
> _______________________________________________
> checkmk-en mailing list
> checkmk-en at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mathias-kettner.de/pipermail/checkmk-en/attachments/20150202/d2f33886/attachment-0001.html>


More information about the checkmk-en mailing list