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

Invalid network label (because of a space in the network's name) #142

Closed
mrik974-gig opened this issue Oct 21, 2022 · 5 comments
Closed
Labels
bug Something isn't working
Milestone

Comments

@mrik974-gig
Copy link
Contributor

Hi :)
I'm getting this error :
go:337 level=error component="discovery manager scrape" discovery=file msg="Error reading file" path=/etc/sd/vcd-vdcplus.json err="\"__meta_vcd_network_network name\" is not a valid label name"

It seems that a space in any label name is not good for Prometheus.
I'm not confident in developing in Go but if you don't have time I can take a look at it :)

@tboerger tboerger added the bug Something isn't working label Oct 21, 2022
@tboerger tboerger added this to the v0.4.1 milestone Oct 21, 2022
@tboerger
Copy link
Member

Hum, haven't seen network names with spaces in it. You could provide a PR which extends this list: https://github.com/promhippie/prometheus-vcd-sd/blob/master/pkg/action/discoverer.go#L284-L288

mrik974-gig added a commit to mrik974-gig/prometheus-vcd-sd that referenced this issue Oct 28, 2022
Fixes a bug that prevents prometheus from reading the output file, due to the presence of spaces in network names (fixes issue promhippie#142)
@mrik974-gig
Copy link
Contributor Author

Thanks @tboerger, it's done. Do I need to update the changelog as well ?

@tboerger
Copy link
Member

Oh it would be great if you add a new markdown file to changelog/unreleased/, details how to write it you can see within the changelog/ directory.

@mrik974-gig
Copy link
Contributor Author

Thank that was fast and neat ! 💯

@tboerger
Copy link
Member

tboerger commented Nov 5, 2022

I had to fix the formatting, but nevertheless the latest tag should already include this fix.

@klucsik klucsik mentioned this issue Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants