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

[vcenterreceiver] standalone ESXi not working #33073

Closed
suprnova1 opened this issue May 15, 2024 · 6 comments
Closed

[vcenterreceiver] standalone ESXi not working #33073

suprnova1 opened this issue May 15, 2024 · 6 comments

Comments

@suprnova1
Copy link

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

@suprnova1 suprnova1 added bug Something isn't working needs triage New item requiring triage labels May 15, 2024
Copy link
Contributor

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
Copy link
Contributor

Taking a look into this now

@StefanKurek
Copy link
Contributor

@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.

@djaglowski djaglowski removed the needs triage New item requiring triage label May 16, 2024
djaglowski pushed a commit that referenced this issue May 16, 2024
…l Apps (#33102)

**Description:** <Describe what has changed.>
Virtual Apps might not exist in an environment. Currently a `NotFound`
error for the internal client is thrown when this condition occurs. I
modified this to simply return an empty array, because this should
simply mean that it did not find any Virtual Apps. I also added more
client unit tests to test for these types of conditions.

**Link to tracking Issue:** <Issue number if applicable>
#33073 (loosely tied to this. At the very least this issue made me
discover this problem)

**Testing:** <Describe what testing was performed and which tests were
added.>
Added new unit tests which showed the error. Fix caused the new unit
test to pass.

**Documentation:** <Describe the documentation added.>
N/A
@StefanKurek
Copy link
Contributor

@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!

Copy link
Contributor

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 github-actions bot added the Stale label Jul 17, 2024
Copy link
Contributor

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

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants