You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How do we provide query parameters (to a JSON endpoint)?
I have a Loki query for JSON logs flowing in:
sum by (remote_addr) (count_over_time({host=~"$host"} | json | __error__="" [1m]))
Which, I don't know, I think it should give me a list of remote_addr which is a list of IPs. Whatever. Not important. Whichever Loki query returns a list of remote_addr.
I have a JSON endpoint in the map panel (don't know what aggregation should be). The endpoint returns location data for corresponding IPs. IPs could just as well be some other entity we could look up.
So I can query either (for a single remote_addr): http://localhost/country/
How do we provide query parameters (to a JSON endpoint)?
I have a Loki query for JSON logs flowing in:
Which, I don't know, I think it should give me a list of
remote_addr
which is a list of IPs. Whatever. Not important. Whichever Loki query returns a list ofremote_addr
.I have a JSON endpoint in the map panel (don't know what aggregation should be). The endpoint returns location data for corresponding IPs. IPs could just as well be some other entity we could look up.
So I can query either (for a single
remote_addr
):http://localhost/country/
produces
or (for multiple
remote_addr
)http://localhost/country/?ip=ip1,ip2,ip3
produces
This could be augmented to JSONP.
Is this possible today? easy to implement? JSON endpoint can take something like:
http://localhost/country/{{.remote_addr}}
for both single and multipleremote_addr
The text was updated successfully, but these errors were encountered: