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

Enhancement: Add sysinfo.json option to return number of mesh nodes #950

Closed
bwarden opened this issue Sep 28, 2023 · 0 comments · Fixed by #951
Closed

Enhancement: Add sysinfo.json option to return number of mesh nodes #950

bwarden opened this issue Sep 28, 2023 · 0 comments · Fixed by #951

Comments

@bwarden
Copy link
Contributor

bwarden commented Sep 28, 2023

For automated monitoring of a node's health and its connected mesh's health too, it would be nice to get a snapshot of how many mesh nodes exist via sysinfo.json. This snippet would do the job:

-- MESH NODES COUNT
if string.find(nixio.getenv("QUERY_STRING"):lower(),"nodes=1") then
        info['nodes']=aredn_info.getOLSRInfo()
end

and adds to the returned object:

  "nodes": {
    "nodes": "335",
    "entries": "1186"
  },
bwarden added a commit to bwarden/aredn that referenced this issue Sep 28, 2023
aanon4 pushed a commit that referenced this issue Sep 30, 2023
* Implement nodes=1 in sysinfo.json to return number of mesh nodes

Fixes #950

* Bump api_version in sysinfo.json

Introduce new parameter nodes=1
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

Successfully merging a pull request may close this issue.

1 participant