Hello,
So I'm trying to convert this stats output to something I can use in a zabbix discovery:
The problem is getting the list of GPU's to use as a macro for getting the other paths...
The more direct values like Total Hashrate work fine, as they have a simple path structure.
In JQ I can get this:
cat nanominer-stats.out | jq '.Devices[] | to_entries | map(select(.key | match("GPU";"i") )) | map(.key)'
[
"GPU 0",
"GPU 1",
"GPU 2"
]
but I've not been able to find how to do the equivalent in jsonpath, or if indeed you can...
Anyone have any ideas?
I've considered doing the gpu.discovery as an agent parameter, but I'd prefer to keep everything as a dependent item from the initial http request.
Thanks,
Sean
So I'm trying to convert this stats output to something I can use in a zabbix discovery:
The problem is getting the list of GPU's to use as a macro for getting the other paths...
The more direct values like Total Hashrate work fine, as they have a simple path structure.
In JQ I can get this:
cat nanominer-stats.out | jq '.Devices[] | to_entries | map(select(.key | match("GPU";"i") )) | map(.key)'
[
"GPU 0",
"GPU 1",
"GPU 2"
]
but I've not been able to find how to do the equivalent in jsonpath, or if indeed you can...
Anyone have any ideas?
I've considered doing the gpu.discovery as an agent parameter, but I'd prefer to keep everything as a dependent item from the initial http request.
Thanks,
Sean