Requirement:
curl -sg 'http://prom-server:prom-port/api/v1/metadata' | jq -r '.data'
curl -sg 'http://prom-server:prom-port/api/v1/metadata' | jq -r '(["metric_name","description"], (.data | to_entries[] | [.key, .value[0].help])) | @csv'
Requirement:
curl -sg 'http://prom-server:prom-port/api/v1/metadata' | jq -r '.data'
curl -sg 'http://prom-server:prom-port/api/v1/metadata' | jq -r '(["metric_name","description"], (.data | to_entries[] | [.key, .value[0].help])) | @csv'