Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vars: monitor the Nth object of an array #29

Open
arl opened this issue Jun 15, 2018 · 1 comment
Open

vars: monitor the Nth object of an array #29

arl opened this issue Jun 15, 2018 · 1 comment

Comments

@arl
Copy link

arl commented Jun 15, 2018

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
@divan
Copy link
Owner

divan commented Jun 27, 2018

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants