vectordotdev / vector

A high-performance observability data pipeline.
https://vector.dev
Mozilla Public License 2.0
17.57k stars 1.54k forks source link

Templating query arguments for http_scrape #14621

Open mans2singh opened 2 years ago

mans2singh commented 2 years ago

A note for the community

My use case is that I need to pass start and end time parameters to the http request as query parameters.

I have checked the documentation for http_scrape but did not this option.

Use Cases

The http_scrape source allows periodically scraping an endpoint using scrape_interval_secs. It would be great if we can allow templating query parameters with functions which can be used by endpoint to customize the response. One example can be start_time query parameter, which could be templated as {{ now() }}.

Attempted Solutions

I was not able find any way in http_scrape to pass such arguments so am requesting a feature enhancement.

Proposal

Allow templating query parameters to be templates which can invoke vrl functions.

References

No response

Version

0.25 nightly build

wrenix commented 2 months ago

Maybe we should first solve #14758 and the this issue - so that During this issue also the body could also be templated

tayontech commented 2 months ago

Upvote this. I'm looking for this same feature