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

Python CLI to self diagnose Nym nodes #4606

Merged
merged 17 commits into from
Jun 26, 2024
Merged

Python CLI to self diagnose Nym nodes #4606

merged 17 commits into from
Jun 26, 2024

Conversation

serinko
Copy link
Contributor

@serinko serinko commented May 20, 2024

Description

Python CLI for devrel and operators, simplifying diagnose of a any node, especially if ran side by side with nym-gateway-probe.

query_stats command runs over all possible API checks based on nodes identity key. An example like:
./node_api_check.py query_stats <IDENTITY_KEY> will return all stats about any bonded node.

Optional flags:

  • --output <PATH> - export output to a txt file
  • --markdown - will output stats in markdown format
  • --no_routing_history - excludes sometimes lengthy routing history from output

version_count command returns a table of node summary in the given version. For example ./node_api_check.py version_count <VERSION_1> <VERSION_2> <VERSION_3> --markdown will return a neat markdown table counting all nodes in version 1, 2, and 3. Use Nym binary versioning (ie 1.1.3) separated by space.

Tasks

  • Checks whether the nodes is a mixnode or a gateway or the identity keys doesn't exist
  • Queries and prints all the associated endpoint stats
    • pulls IP to run all swagger checks
    • Add check if https/http and associate a port to it
  • Output to file for easier debugging
  • Version counter

Future steps:

@serinko serinko self-assigned this May 20, 2024
@serinko serinko requested a review from jstuczyn May 21, 2024 09:13
Copy link

vercel bot commented May 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Ignored Deployments
Name Status Preview Comments Updated (UTC)
nym-explorer ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 0:42am
nym-next-explorer ⬜️ Ignored (Inspect) Visit Preview Jun 24, 2024 0:42am

scripts/node_api_check.py Outdated Show resolved Hide resolved
scripts/node_api_check.py Outdated Show resolved Hide resolved
scripts/node_api_check.py Outdated Show resolved Hide resolved
@serinko serinko requested a review from mfahampshire May 22, 2024 18:21
@serinko serinko added the python Pull requests that update Python code label May 22, 2024
@serinko
Copy link
Contributor Author

serinko commented May 29, 2024

I found out that it returns error when running over a blacklisted GW, This is a crucial problem, I will get back to it this week again.

@serinko serinko changed the title Simple node identity API check Python CLI to self diagnose Nym nodes Jun 19, 2024
@serinko serinko merged commit c42b3f7 into develop Jun 26, 2024
6 of 13 checks passed
@serinko serinko deleted the feature/node-api-check branch June 26, 2024 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devrel gateway python Pull requests that update Python code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants