sozu-proxy / sozu

Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome!
https://www.sozu.io/
GNU Affero General Public License v3.0
3.01k stars 187 forks source link

List backend ? #1101

Closed AlbanMinassian closed 5 months ago

AlbanMinassian commented 5 months ago

Hello.

How list current backend (or frontend) of cluster ?

sozu backend --help show "add" ou "remove" but not "list" sozu cluster list -c xxxx display nothing else clusters

I found https://github.com/sozu-proxy/sozu/pull/874 but no more details. Is it possible ? What i missing ? Aminassian

FlorentinDUBOIS commented 5 months ago

Hello :wave:,

I do not understand well what you are missing. Could you give me more details about the command you are using and the current output and the expected one.

Besides, this is an example from production at Clever Cloud of output to get information about one cluster specifically.

# sozu -c /etc/sozu/1.0/config.toml cluster list --id http://app_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx 
Success: Successfully queried clusters
Cluster level configuration:

┌─────────────────────────────────────────────────┬────────────────┬────────────────┬───┬───┬──────┐
│ id                                              │ sticky_session │ https_redirect │ 0 │ 1 │ main │
├─────────────────────────────────────────────────┼────────────────┼────────────────┼───┼───┼──────┤
│ http://app_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx │ false          │ true           │ X │ X │ X    │
└─────────────────────────────────────────────────┴────────────────┴────────────────┴───┴───┴──────┘

HTTP frontends configuration for:

┌─────────────────────────────────────────────────┬────────────────────────────────────────────────────────┬───────────┬───┬───┬──────┐
│ id                                              │ hostname                                               │ path      │ 0 │ 1 │ main │
├─────────────────────────────────────────────────┼────────────────────────────────────────────────────────┼───────────┼───┼───┼──────┤
│ http://app_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx │ app-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.cleverapps.io │ prefix '' │ X │ X │ X    │
└─────────────────────────────────────────────────┴────────────────────────────────────────────────────────┴───────────┴───┴───┴──────┘

HTTPS frontends configuration for:

┌─────────────────────────────────────────────────┬────────────────────────────────────────────────────────┬───────────┬───┬───┬──────┐
│ id                                              │ hostname                                               │ path      │ 0 │ 1 │ main │
├─────────────────────────────────────────────────┼────────────────────────────────────────────────────────┼───────────┼───┼───┼──────┤
│ http://app_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx │ app-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.cleverapps.io │ prefix '' │ X │ X │ X    │
└─────────────────────────────────────────────────┴────────────────────────────────────────────────────────┴───────────┴───┴───┴──────┘

TCP frontends configuration:

┌────┬─────────┬───┬───┬──────┐
│ id │ address │ 0 │ 1 │ main │
└────┴─────────┴───┴───┴──────┘

backends configuration:

┌──────────────────────────────────────┬──────────────────────┬────────┬───┬───┬──────┐
│ backend id                           │ IP address           │ Backup │ 0 │ 1 │ main │
├──────────────────────────────────────┼──────────────────────┼────────┼───┼───┼──────┤
│ 3a09b538-62f0-4ebf-bc86-c3b43cd624e8 │ xx.xxx.xxx.34:11258  │        │ X │ X │ X    │
├──────────────────────────────────────┼──────────────────────┼────────┼───┼───┼──────┤
│ 6c3ec79c-9ada-4f17-9a61-3d9018f6dcf3 │ xx.xxx.xxx.12:14438  │        │ X │ X │ X    │
├──────────────────────────────────────┼──────────────────────┼────────┼───┼───┼──────┤
│ 6f07b940-0070-48af-b1ab-1a72409478fb │ xx.xxx.xxx.32:13219  │        │ X │ X │ X    │
├──────────────────────────────────────┼──────────────────────┼────────┼───┼───┼──────┤
│ b7909ba2-792b-4237-b912-09a15193537f │ xx.xxx.xxx.23:12335  │        │ X │ X │ X    │
├──────────────────────────────────────┼──────────────────────┼────────┼───┼───┼──────┤
│ c453e345-a857-43a5-8bbe-40595f2bc2d1 │ xx.xxx.xxx.18:14244  │        │ X │ X │ X    │
├──────────────────────────────────────┼──────────────────────┼────────┼───┼───┼──────┤
│ f24c9cb9-633d-4f5e-af8a-8cff6c80eccc │ xx.xxx.xxx.108:12193 │        │ X │ X │ X    │
└──────────────────────────────────────┴──────────────────────┴────────┴───┴───┴──────┘

In the above example the cluster identifier is http://app_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

AlbanMinassian commented 5 months ago

🙏 Merci @FlorentinDUBOIS, je n'avais pas compris comment utiliser la commande.