Skip to content

Conversation

shaekhhasanshoron
Copy link

I was facing the following issue. After debugging, I found out that 'rgw.main' was missing in one "usage" form the bucket usage list. So I have added the condition. Please verify and merge it so that we can use the exporter.

Traceback (most recent call last):
  File "./radosgw_usage_exporter.py", line 324, in <module>
    main()
  File "./radosgw_usage_exporter.py", line 313, in main
    args.host, args.admin_entry, args.access_key, args.secret_key))
  File "/usr/local/lib/python2.7/site-packages/prometheus_client/core.py", line 50, in register
    names = self._get_names(collector)
  File "/usr/local/lib/python2.7/site-packages/prometheus_client/core.py", line 86, in _get_names
    for metric in desc_func():
  File "./radosgw_usage_exporter.py", line 70, in collect
    self._get_bucket_usage(bucket)
  File "./radosgw_usage_exporter.py", line 231, in _get_bucket_usage
    if 'size_actual' in bucket['usage']['rgw.main']:
KeyError: 'rgw.main'

@blemmenes
Copy link
Owner

@shaekhhasanshoron can you provide more information on the situation you are encountering?

Ceph version, exporter version and JSON output of the bucket(s) that you are trying to address?

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