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

Bug: Couldn't get metrics ..., exception 'str' object has no attribute 'items' #29

Open
afcollins opened this issue Dec 18, 2024 · 1 comment · May be fixed by #30
Open

Bug: Couldn't get metrics ..., exception 'str' object has no attribute 'items' #29

afcollins opened this issue Dec 18, 2024 · 1 comment · May be fixed by #30

Comments

@afcollins
Copy link
Member

If an aggregated metric has a "not" section (example [1]), we will see an error[2].

[1]:

    - name: monitoringCPU
      metricName : containerCPU
      labels.namespace.keyword: openshift-monitoring
      metric_of_interest: value
      not:
        labels.container.keyword: kube-rbac-proxy                                                                                                                                                                                                                      
      agg:
        value: cpu 
        agg_type: avg 
      labels:
        - "[Jira: monitoring]"
      direction: 1

[2]:

2024-12-18 11:20:18,312 - Orion      - INFO - file: utils.py - line: 52 - Collecting monitoringCPU
2024-12-18 11:20:18,312 - Orion      - ERROR - file: utils.py - line: 65 - Couldn't get metrics monitoringCPU, exception 'str' object has no attribute 'items'
@afcollins
Copy link
Member Author

I think I already found the source, and will raise a fixing PR shortly.

afcollins added a commit to afcollins/py-commons that referenced this issue Dec 18, 2024
@afcollins afcollins linked a pull request Dec 18, 2024 that will close this issue
3 tasks
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 a pull request may close this issue.

1 participant