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

Adding template label #208

Merged
merged 2 commits into from
Jan 3, 2024
Merged

Adding template label #208

merged 2 commits into from
Jan 3, 2024

Conversation

spearcrow
Copy link
Contributor

Hi, I want to add template label for this issue #199

Can you check it?

Copy link
Member

@znerol znerol left a comment

Choose a reason for hiding this comment

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

Thanks @spearcrow for filing this PR. I left some comments inline.

Comment on lines 206 to 209
'template': GaugeMetricFamily(
'pve_template',
'Whether or not the VM/CT is template',
labels=['id']),
Copy link
Member

@znerol znerol Jan 2, 2024

Choose a reason for hiding this comment

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

This adds a new metric. Judging from the feature request #199 I believe that a new label should be added on the existing pve_guest_info metric.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe just try to add the template key into the labels array instead? Look for that a couple of lines further down.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi,

I've update the template key as labels in pve_guest_info.
I'm sorry if there is any mistake in my code, because I'm not a developer.

Copy link
Member

Choose a reason for hiding this comment

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

Perfect. Thanks, this is working well against my cluster.

@znerol znerol merged commit 816b6e2 into prometheus-pve:main Jan 3, 2024
1 check failed
@znerol znerol mentioned this pull request Jan 3, 2024
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.

3 participants