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

Variable containing special characters #62

Closed
DMOsipov opened this issue Aug 9, 2019 · 1 comment
Closed

Variable containing special characters #62

DMOsipov opened this issue Aug 9, 2019 · 1 comment
Labels

Comments

@DMOsipov
Copy link

DMOsipov commented Aug 9, 2019

Hi,

In my dashboard I have variable $instance containing IP address of monitored host, for example 127.0.0.1
If I specify filter expression instance="$instance" then empty resultset is returned from the prometheus alert manager. In query inspector I can see that all dots in IP address escaped with two backslashes and than URI-encoded:

api/datasources/proxy/2/api/v1/alerts?silenced=false&inhibited=false&filter=instance%3D%22127%5C%5C.0%5C%5C.0%5C%5C.1%22"

and of course alert manager is unable to find alerts with instance=127\\.0\\.0\\.1

Investigating the issue I found that fix #40 added new function interpolateQueryExpr calling dsSpecialRegexEscape with very string escape functionality. I have no idea why so many escapes are required, but seems those escape function is the root cause of my issue.

@hbollon hbollon added the bug label May 5, 2022
@hbollon
Copy link
Member

hbollon commented May 11, 2022

Hey @DMOsipov,
Sorry for the (very) late response 😓
This issue should be now solved since few releases, if you're always using our plugin maybe you could give a try to the new v1.1.0 😉
I'm closing this but don't hesitate to open new issues.

@hbollon hbollon closed this as completed May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants