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 match error if there is an asterisk followed by an underscore #241

Open
enriquezubiria opened this issue Oct 4, 2023 · 1 comment

Comments

@enriquezubiria
Copy link

Hi,
The following mappings file (I include only the relevant part)

- match: "servers.*_guadaltel_es_guadaltel_es.*.*"
  name: "${3}"
  labels:
    instance: "${1}.guadaltel.es"
    type: "${2}"

throws the following error

ts=2023-10-04T09:56:07.639Z caller=main.go:83 level=info msg="Starting graphite_exporter" version_info="(version=0.13.1, branch=HEAD, revision=4848deacb8fd5a1087379026857ad3764a00aa8d)"
ts=2023-10-04T09:56:07.639Z caller=main.go:84 level=info build_context="(go=go1.19.3, user=root@e4fc80d65bcd, date=20221205-15:57:35)"
ts=2023-10-04T09:56:07.639Z caller=main.go:94 level=error msg="Error loading metric mapping config" err="invalid match: servers.*_guadaltel_es_guadaltel_es.*.*"

But if I use match: "servers.*.*.*" or match: "servers.xxxx_guadaltel_es_guadaltel_es.*.*" it works properly.
Any suggestion?
Regards,

@enriquezubiria enriquezubiria changed the title Invalid match error if there is an underscore Invalid match error if there is an asterisk followed by an underscore Oct 4, 2023
@matthiasr
Copy link
Contributor

I believe this is because we do not support prefix matches yet. The Graphite exporter uses the mapping code from the StatsD exporter, so the implementation would happen over there, and then we pull it in here via a dependency upgrade. If you want to tackle this, please do 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants