jq_json_check_mk
This is an old revision of the document!
jq - Command-line JSON processor / Check_MK
- Extract all configured hosts from Check_MK and print hostname and folder:
curl "https://<server>/<site>/check_mk/webapi.py?action=get_all_hosts&_username=$user&_secret=$secret" \ | jq '.result[] | {hostname: .hostname, path: .path}'
- Extract CSV:
| jq -r '.[] | map([.hostname, .path] | join (", ")) | join ("\n")'
jq_json_check_mk.1492522230.txt.gz · Last modified: 2017/04/18 13:30 by admin