Ben's notes

Linux, Unix, network, radio...

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 revisionPrevious revision
Last revisionBoth sides next revision
jq_json_check_mk [2017/04/18 13:30] – [jq - Command-line JSON processor / Check_MK] adminjq_json_check_mk [2017/04/18 13:36] – [jq - Command-line JSON processor / Check_MK] admin
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: 2021/10/09 15:14 by 127.0.0.1