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

Label Creation Issue #585

Closed
rahulguptajss opened this issue Oct 20, 2021 · 1 comment · Fixed by #601
Closed

Label Creation Issue #585

rahulguptajss opened this issue Oct 20, 2021 · 1 comment · Fixed by #601
Labels
documentation Improvements or additions to documentation

Comments

@rahulguptajss
Copy link
Contributor

rahulguptajss commented Oct 20, 2021

Label path generation logic in harvest is incorrect. Refer method https://github.com/NetApp/harvest/blob/main/cmd/collectors/zapi/collector/parsers.go#L132
It ends up creating below highlighted labels for the template. This needs to be fixed. Only workaround currently is to override label names genration logic using =>

name:                     Spare
query:                    aggr-spare-get-iter
object:                   spare
collect_only_labels:      true
counters:
  aggr-spare-disk-info:
    - ^^disk                       #Generates label path as aggr-disk
    - ^disk-type                 #Generates label path as aggr-disk-type
    - ^is-disk-zeroed		=> is_disk_zeroed            #This gets correctly generated as is_disk_zeroed
    - ^^original-owner   => original_owner                       #This gets correctly generated as original_owner
export_options:
  instance_keys:
    - disk
    - original_owner
  instance_labels:
    - disk_type
    - is_disk_zeroed
@cgrinds
Copy link
Collaborator

cgrinds commented Oct 20, 2021

as discussed on Slack, Rahul mentioned that if you change this it works as expected. Be explicit.

- ^^disk     => disk
- ^disk-type => disk_type

@rahulguptajss rahulguptajss added documentation Improvements or additions to documentation and removed status/needs-triage labels Oct 25, 2021
rahulguptajss added a commit that referenced this issue Oct 25, 2021
rahulguptajss added a commit that referenced this issue Oct 25, 2021
cgrinds pushed a commit that referenced this issue Oct 26, 2021
* docs: label creation issue

Fixes #585
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants