3 ms·
Good call, I will update the post. It would look like this, for posterity: jq '.data.result[].metric | select(.app == "toodle-app").task_name' The reason I w
by sequoia 6y ago
Good call, I will update the post.
It would look like this, for posterity:
jq '.data.result[].metric | select(.app == "toodle-app").task_name'
The reason I was putting the querying into promql where possible is that it is (I assume) more efficient to do that filtering on the server & only return matching values rather than returning "everything" & filtering locally. But your point stands, it's tangential here. Thanks for the feedback this will definitely improve the post!
Edit: updated!
- shhsshs 6y agoI think it makes sense to point out that it could be done better using just promql, but it's useful to show how to do it in just jq for those using other tools!