more alert history tricks authored by anarcat's avatar anarcat
not sure where that .[].alerts was coming from, but it was just not
working here.

also, -s is not what i thought it was, and removing it makes things
simpler (and might have explained the weird .[]).
......@@ -1270,11 +1270,22 @@ Alertmanager. All logged entries since last boot can be seen with:
You can see a prettier version of recent entries with the `jq`
command, for example:
journalctl -u tpa_http_post_dump.service -o cat -e | grep '^{' | jq -s .[].alerts
journalctl -u tpa_http_post_dump.service -o cat -e | grep '^{' | jq -C . | less -r
Note that the `grep` is required because `journalctl` insists on
bundling supervisor messages in its output, so we filter for JSON
objects, basically.
objects, basically. That said, this might just work as well:
journalctl -u tpa_http_post_dump.service -o cat -e | jq -C . | less -r
Or to follow updates in real time:
journalctl -u tpa_http_post_dump.service -o cat -f | jq .
The top-level objects are actually notification groups, you can also
restrict the output the actual, individual alerts with:
journalctl -u tpa_http_post_dump.service -o cat -f | jq .alerts
### Testing alerts
......
......