Merge jq output into a comma separated string like
0
votes
1
answer
2764
views
I have this output and would like to convert it into a Prometheus-like format by [JQ](https://stedolan.github.io/jq/) .
cat /tmp/wp-plugin.txt | jq .[]
{
"name": "akismet",
"status": "active",
"update": "none",
"version": "5.0"
}
{
"name": "performance-lab",
"status": "active",
"update": "none",
"version": "1.4.0"
}
My goal is to get like this using JQ CLI tools
wp_plugins{name="akismet",status="active",update="none",version="5.0"}0
wp_plugins{name="performance-lab",status="active",update="active",version="1.4.0"}1
Asked by Rostyslav Malenko
(103 rep)
Aug 24, 2022, 11:35 AM
Last activity: Aug 24, 2022, 12:39 PM
Last activity: Aug 24, 2022, 12:39 PM