Ben Stienstra

Linux, Unix, network, radio and more...

User Tools

Site Tools


jq_json_check_mk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
jq_json_check_mk [2017/04/18 15:30]
admin [jq - Command-line JSON processor / Check_MK]
jq_json_check_mk [2017/04/18 15:36] (current)
admin [jq - Command-line JSON processor / Check_MK]
Line 8: Line 8:
 </code> </code>
   * Extract CSV:<code>   * Extract CSV:<code>
-| jq -r '.[] | map([.hostname, .path] | join (", ")) | join ("\n")' +curl "https://<server>/<site>/check_mk/webapi.py?action=get_all_hosts&_username=$user&_secret=$secret"
 +| jq -r '.result[] | [.hostname, .path] | join (";")'
 </code> </code>
jq_json_check_mk.txt · Last modified: 2017/04/18 15:36 by admin