open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.97k stars 2.3k forks source link

[vcenterreceiver] standalone ESXi not working #33073

Closed suprnova1 closed 3 weeks ago

suprnova1 commented 4 months ago

Component(s)

No response

What happened?

As per documentation "This receiver fetches metrics from a vCenter or ESXi host running VMware vSphere APIs."

However, because there is no cluster within standalone ESXi, I receive the following error:

level=error msg="Error scraping metrics" component_path=/ component_id=otelcol.receiver.vcenter.default error="unable to get cluster lists: cluster '*' not found" scraper=vcenter

Collector version

v0.100.0

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

github-actions[bot] commented 4 months ago

Pinging code owners for receiver/vcenter: @djaglowski @schmikei @StefanKurek. See Adding Labels via Comments if you do not have permissions to add labels yourself.

StefanKurek commented 4 months ago

Taking a look into this now

StefanKurek commented 4 months ago

@djaglowski So this actually was an issue back in v0.96.0. It was fixed (not sure if intentionally or as a side effect) in v.097.0.

This did made me double check the current state of the client to see if any other client calls could cause failures like this. Most of the client calls have been updated to a new method, which don't automatically return errors on empty results.

There are still two client calls which intentionally use the older methods and do return these errors at the moment. One for resource pool paths and one for virtual app paths. Resource Pools should always exist (there is something very wrong if they do not), but it's very reasonable that Virtual Apps might not exist in an environment. I have a PR which modifies the Virtual App method to ignore the error if it is a NotFound error for the internal client which simply means that it did not find any Virtual Apps. I also added more client unit tests to test for these types of conditions. This PR will be up shortly.

StefanKurek commented 4 months ago

@suprnova1 Hello! Are you sure that you're using v0.100.0 of the collector? Looking at the error message you posted, it definitely seems like you're using an older version. If you can verify this, using the newest version of the collector should solve your problem. Let me know. Thanks!

github-actions[bot] commented 2 months ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] commented 3 weeks ago

This issue has been closed as inactive because it has been stale for 120 days with no activity.