Skip to content

Filter-by-status for relayed & P2P state #3883

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

Open
florian-obradovic opened this issue May 27, 2025 · 2 comments
Open

Filter-by-status for relayed & P2P state #3883

florian-obradovic opened this issue May 27, 2025 · 2 comments

Comments

@florian-obradovic
Copy link

I'd like to filter the detailed status for all peers which are connected via relay or P2P
Example: netbird status -d --filter-by-status P2P

@Silex
Copy link
Contributor

Silex commented Jun 6, 2025

In the meantime you can use this:

netbird status --json | jq '.peers.details[] | select(.connectionType == "P2P")'

@florian-obradovic
Copy link
Author

florian-obradovic commented Jun 6, 2025

@Silex awesome - thank you very much!
netbird status --json | jq -r '.peers.details[] | select(.connectionType == "P2P") | [.fqdn, .netbirdIp, .status, .connectionType] | @tsv' | column -t

or

netbird status --json | jq -r '.peers.details[] | select(.connectionType == "Relayed") | [.fqdn, .netbirdIp, .status, .connectionType] | @tsv' | column -t

Image

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

No branches or pull requests

2 participants