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

feat: Add support for Redshift-Serverless #1589

Merged
merged 4 commits into from
Jan 14, 2025

Conversation

nickbazinet
Copy link
Contributor

Add support for scraping Redshift-Serverless metrics.

When I queried the /metrics endpoint, I was able to view the expected metrics:
image

This is my first PR on this project and I am not 100% sure about the ResourceFilters in services.go, but based on my understanding it seems proper.
Feedback is then appreciated :)

This was based on this config:

 jobs:
  - type: AWS/Redshift-Serverless
    regions: *regions
    roles: *masterArns
    enableMetricData: true
    metrics:
      - name: DatabaseConnections
        statistics:
          - Average
        period: 60
        length: 60
        nilToZero: true
      - name: ComputeCapacity
        statistics:
          - Average
        period: 60
        length: 60
        nilToZero: true
      - name: QueriesCompletedPerSecond
        statistics:
          - Average
        period: 60
        length: 60
        nilToZero: true
      - name: ComputeSeconds
        statistics:
          - Average
        period: 60
        length: 60
        nilToZero: true
      - name: QueriesFailed
        statistics:
          - Average
        period: 60
        length: 60
        nilToZero: true
      - name: QueriesQueued
        statistics:
          - Average
        period: 60
        length: 60
        nilToZero: true
      - name: QueriesRunning
        statistics:
          - Average
        period: 60
        length: 60
        nilToZero: true
      - name: QueriesSucceeded
        statistics:
          - Average
        period: 60
        length: 60
        nilToZero: true
    exportedTagsOnMetrics: *masterTags

ResourceFilters: []*string{
aws.String("redshift-serverless:namespace"),
},
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickbazinet would you mind adding a test case in the maxdimassociator package?

@nickbazinet nickbazinet force-pushed the master branch 2 times, most recently from ce57a21 to a2ea539 Compare January 13, 2025 21:15
@cristiangreco cristiangreco merged commit b95099a into prometheus-community:master Jan 14, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants