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

Multi Http Checks - Variable substitution in request body with quotes #655

Open
h1bay1 opened this issue Dec 5, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@h1bay1
Copy link

h1bay1 commented Dec 5, 2023

What happened:
I'm trying to setup a multi http check which uses variables in the request body. The request body is JSON format but I can't work out how to escape the variable identifier so that the variable is parsed. I've successfully used the variable in the request url but haven't been able to get it substituting in the body.

I've tried the following substitution formats:

{ "orderId": "${orderId}" }
{ "orderId": '"${orderId}"' }
{ "orderId": \"${orderId}\" }
{ "orderId": ${orderId:doublequote} }

What you expected to happen:
The variables would substitute in the request body using one of the above formats, or the docs updated to exclude "body" from the supported fields for variables https://grafana.com/docs/grafana-cloud/monitor-public-endpoints/checks/multihttp/#variables

How to reproduce it (as minimally and precisely as possible):

  1. Create a Multi HTTP GET request which sets a variable
  2. Create a Multi HTTP POST request which uses the variable in the request body (with double quotes)
  3. The second request won't contain the variable value.

Anything else we need to know?:

Environment:

  • Grafana version: Grafana Cloud
  • SM plugin version: Multi Http Checks
@h1bay1 h1bay1 added the bug Something isn't working label Dec 5, 2023
@peterschretlen
Copy link
Contributor

This is a bug in the agent code: grafana/synthetic-monitoring-agent#637

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