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

Cluster name disabled for mongodbatlasreceiver metrics #31842

Closed
preshit1505 opened this issue Mar 19, 2024 · 9 comments
Closed

Cluster name disabled for mongodbatlasreceiver metrics #31842

preshit1505 opened this issue Mar 19, 2024 · 9 comments
Labels
enhancement New feature or request needs triage New item requiring triage receiver/mongodbatlas

Comments

@preshit1505
Copy link

Component(s)

receiver/mongodbatlas

Is your feature request related to a problem? Please describe.

We are trying to create mongodb atlas grafana dashboard where we using the mongodbatlasreceiver in our OTEL collector to get the metrics. Since the mongodb_atlas.cluster.name in metadata.yaml has been disabled, which causes not able to filter the metrics data based on the cluster name
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/mongodbatlasreceiver/metadata.yaml#L34C2-L37

Describe the solution you'd like

solution for the above issue would be enabling the cluster name filter in the metrics

Describe alternatives you've considered

As of now, we dont really have an alternative to resolve this issue in our dashboards

Additional context

No response

@preshit1505 preshit1505 added enhancement New feature or request needs triage New item requiring triage labels Mar 19, 2024
Copy link
Contributor

Pinging code owners:

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

@preshit1505 preshit1505 changed the title Cluster name enabled for mongodbatlasreceiver metrics Cluster name disabled for mongodbatlasreceiver metrics Mar 19, 2024
@crobert-1
Copy link
Member

Hello @preshit1505, all of the resource attributes and metrics in metadata.yaml can be enabled in your collector config. Have you been able to get this working?

receivers:
  mongodbatlas:
    resource_attributes:
      mongodb_atlas.cluster.name:
        enabled: true

@preshit1505
Copy link
Author

Hello @crobert-1 , I have not been able to make it work. How can i enable it in my collector config? Do we have any flag to enable? I only see labels like projects, organization, page_size, types in EVENTS

@crobert-1
Copy link
Member

The configuration I shared in my comment should enable the resource attribute to be ingested by the collector. Are you able to add the resource_attributes block to your config? (If this doesn't make sense, can you share your current config?)

@preshit1505
Copy link
Author

preshit1505 commented Mar 20, 2024

ohh so this block can be added directly in the collector config. This is my current config:
`config:
receivers:

mongodbatlas:
  public_key: ${MONGODB_PUBLIC_KEY}
  private_key: ${MONGODB_PRIVATE_KEY}
  events:
    projects:
      - name: bedrock-control-plane-preview
    organizations:
      - id: XXXXX
    poll_interval: 1m
    page_size: 100
    max_pages: 50`

@crobert-1
Copy link
Member

That's correct, sorry, I should have been more clear with that. You should be able to just add it to your config to enable it.

Something like this:

mongodbatlas:
  public_key: ${MONGODB_PUBLIC_KEY}
  private_key: ${MONGODB_PRIVATE_KEY}
  events:
    projects:
      - name: bedrock-control-plane-preview
    organizations:
      - id: XXXXX
    poll_interval: 1m
    page_size: 100
    max_pages: 50
  resource_attributes:
    mongodb_atlas.cluster.name:
      enabled: true

@preshit1505
Copy link
Author

wow awesome @crobert-1 i will try this and let you know here if that works. Thanks for your quick responses. Really appreciate that

@preshit1505
Copy link
Author

@crobert-1 omg it WORKED. Thank you so much for this help.

@crobert-1
Copy link
Member

Glad to hear it! Happy to help 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs triage New item requiring triage receiver/mongodbatlas
Projects
None yet
Development

No branches or pull requests

2 participants