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

vcenter data collection is not happening #34958

Open
vishnu-k1 opened this issue Sep 2, 2024 · 4 comments
Open

vcenter data collection is not happening #34958

vishnu-k1 opened this issue Sep 2, 2024 · 4 comments

Comments

@vishnu-k1
Copy link

Component(s)

No response

What happened?

Description

I used vcenter receiver to pull data from vcenter data for monitoring but it endsup with error and terminating the collector from running.

Steps to Reproduce

Expected Result

vcenter datacollection

Actual Result

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe8 pc=0x382497e]

goroutine 95 [running]:
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).buildVMMetrics(0xc001da4660, 0x17f15d72807f6040, 0xc001e498c8, 0xc003206988, 0xc002397a60?)
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/processors.go:310 +0x1de
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).processVMs(0xc001da4660, 0x17f15d72807f6040, 0xc001e498c8, 0xc002b80840, 0xc002397850, 0xc002397cd0)
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/processors.go:228 +0xfb
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).processDatacenterData(0xc001da4660, 0xc001e498c8, 0xc002397cd0)
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/processors.go:41 +0x25d
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).scrapeAndProcessAllMetrics(0xc001da4660, {0x56df948, 0xc001e133e0}, 0xc002397cd0)

Collector version

108

Environment information

Environment

OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
RHEL 9.4 go 1.22

OpenTelemetry Collector configuration

receivers:

    vcenter:
      endpoint: 'https://kmga001.dryicelabs.com/'
      username: 'svc-vc-readonly'
      password: 'wwwww'
      collection_interval: 5m
      initial_delay: 1s
      tls:
        insecure: true
      metrics:
       vcenter.host.cpu.utilization:
        enabled: false

processors:
  metricstransform:
   transforms:
    include: ^system
    match_type: regexp
    action: update
    operations:
        - action: add_label
          new_label: host.name
          new_value: "SC009"
        - action: add_label
          new_label: os.type
          new_value: "RHEL"
        - action: add_label
          new_label: os.version
          new_value: "RHEL 9.4"
        - action: add_label
          new_label: host.ip
          new_value: "10.1.1.77"

  batch:
    send_batch_size: 3

exporters:
 otlp/data-prepper:
  endpoint: "http://10.1.180.221:21891"
  tls:
    insecure: true

 file:
  path: '/tmp/incoming_to_otel.json'
 debug:
  verbosity: detailed
service:
 pipelines:

   metrics/vc:
    receivers: [vcenter]
    exporters: [otlp/data-prepper]

Log output

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0xe8 pc=0x382497e]
 
goroutine 95 [running]:
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).buildVMMetrics(0xc001da4660, 0x17f15d72807f6040, 0xc001e498c8, 0xc003206988, 0xc002397a60?)
        github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/processors.go:310 +0x1de
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).processVMs(0xc001da4660, 0x17f15d72807f6040, 0xc001e498c8, 0xc002b80840, 0xc002397850, 0xc002397cd0)
        github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/processors.go:228 +0xfb
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).processDatacenterData(0xc001da4660, 0xc001e498c8, 0xc002397cd0)
        github.com/open-telemetry/opentelemetry-collector-contrib/receiver/[email protected]/processors.go:41 +0x25d
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver.(*vcenterMetricScraper).scrapeAndProcessAllMetrics(0xc001da4660, {0x56df948, 0xc001e133e0}, 0xc002397cd0)

Additional context

No response

@vishnu-k1 vishnu-k1 added bug Something isn't working needs triage New item requiring triage labels Sep 2, 2024
@Frapschen
Copy link
Contributor

Pinging code owners: @djaglowsk, @schmikei, @StefanKurek

Copy link
Contributor

github-actions bot commented Sep 3, 2024

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

Hello. This seems to imply that you weren't able to pull the config info for a VM which seems odd. Any reason that your user's permissions wouldn't allow this?

Copy link
Contributor

github-actions bot commented Dec 2, 2024

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 Dec 2, 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