expvarmon
expvarmon copied to clipboard
vars: monitor the Nth object of an array
I can't find a way to monitor a variable located in an object inside an array, see the following JSON:
"Blah": {
"DeviceStatus": [
{
"Descr": "Foo",
"ConnectionStatus": false,
},
{
"Descr": "Bar",
"ConnectionStatus": false,
}
]
}
I tried with:
expvarmon -vars="Foo:Blah.DeviceStatus[0].ConnectionStatus"
but the UI gives me:
Blah.DeviceStatus[0].ConnectionStatus: N/A
Hey @arl, this feature is unsupported.
I wonder, where is the expectation of [0] to work with JSON comes from – from jq experience? Other tooling? I'm asking because if many people expect similar behaviour, maybe it will make sense to basically duplicate the jq syntax or something like it.
And, of course, PRs are always welcome.