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

Parse node_info.json from OpsCenter Diagnostics Report #3

Closed
ErickRamirezDS opened this issue Jul 14, 2015 · 3 comments
Closed

Parse node_info.json from OpsCenter Diagnostics Report #3

ErickRamirezDS opened this issue Jul 14, 2015 · 3 comments

Comments

@ErickRamirezDS
Copy link
Owner

Implement a new script which makes the node_info.json data readable.

@markcurtis1970
Copy link
Collaborator

I used this very crude one liner as a start, but we could really do with prefixing with the node IP / name:

for line in $(cut -d : -f1 node_info.json | grep "\".*\"" | sed -e "s/^ *\"//" -e "s/\"//" | sort -u | grep -v "^[1-2]"); do grep $line node_info.json ;done

@markcurtis1970
Copy link
Collaborator

I used these very simple python commands to get some particular output as an example. I think in this case python might be quite simple?

import json
data = json.loads(open('node_info.json').read())
for node in data:
    print data[node]['node_ip'],'\t',data[node]['agent_jvm_version']

@markcurtis1970
Copy link
Collaborator

New script added in the following pull request: #4

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