json

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Json / jq

# processing Icinga warning Json list
PASSWORD=terceS
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

Syndicate content