Open
Description
Request
Add a function to the standard library similar to json_decode
but in the reverse direction. Taking a map type and encoding to a string.
Use case
In order to configure the embedded blackbox, it would be nice to be able to use the powerful features of Alloy syntax while providing the inline configuration.
prometheus.exporter.blackbox "example" {
config = json_encode({
modules = {
http_2xx = {
prober = "http"
http = {
headers = {
"Authorization" = sys.env("HTTP_AUTH_HEADER")
}
}
}
}
})
target "example" {
address = "http://example.com"
module = "http_2xx"
}
target "grafana" {
address = "http://grafana.com"
module = "http_2xx"
}
}
Metadata
Metadata
Assignees
Type
Projects
Status
Accepted