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

Include subnet name #57

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

normelton
Copy link

This PR will pull an optional subnet name from the user-context of a subnet configuration and include it as a label:

"subnet4": [{
    "subnet": "192.168.0.0/24"
    "user-context": {
        "name": "My Test Subnet"
    },
    "pools": [ ... ]
}]

@Qwiko
Copy link
Contributor

Qwiko commented Jan 6, 2025

Nice find!
However I personally is not a huge fan of incorporating user-defined arbitrary fields in software that is meant to be used by a broad audience.

I think another approach of extending certain behavior outside of the actual code would be preferred so for users that have custom data they would like to be displayed could add that with some setting. Like a list of selected fields in the "user-context" they would like to extend. user-context.name for example would turn into some field like uc_name or the like in the actual metric.

@normelton
Copy link
Author

I think another approach of extending certain behavior outside of the actual code would be preferred so for users that have custom data they would like to be displayed could add that with some setting

So that was my initial approach, but it seems the label names have to be configured when the metric is created. There doesn't appear to be a way to add an ad-hoc label once it's discovered from the Kea server's user-context block :(.

That said, if you have an idea, I'm happy to research/implement.

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