# processing Icinga warning Json list
PASSWORD=pass1234
URL="http://monitoring.example.com/cgi-bin/icinga/status.cgi?servicestatustypes=20&noheader=1&servicestatustypes=29&sorttype=2&sortoption=3&scroll=963&jsonoutput"
wget -q --user=${USER} --password=${PASSWORD} "${URL}" -O - | jq --raw-output ' .status.service_status
| select(.host_name | contains("integration")) | select(.status_information | contains("Apache", "Java")) | .host_name' jq 'select(.geo != null)' all.json jq '[ .devices | select(.key | startswith("dimmer")) | .value = .value.state ] | from_entries' filename.json # pretty print cat /tmp/in.json | python -m json.tool # Links https://stedolan.github.io/jq/manual/ https://jqplay.org/ http://www.compciv.org/recipes/cli/jq-for-parsing-json/ https://github.com/stedolan/jq/issues/82 https://stedolan.github.io/jq/manual/