zeek / zeek-client

Experimental implementation of Zeek's future cluster management client
BSD 3-Clause "New" or "Revised" License
4 stars 4 forks source link

Improve zeek-client's enum handling and add get-nodes command #2

Closed ckreibich closed 2 years ago

ckreibich commented 2 years ago

This PR contains two main parts:

For a deployed configuration this might look as follows:

$ zeek-client get-nodes | jq .
{
  "instance-1": {
    "controller-swinetrek": {
      "cluster_role": null,
      "mgmt_role": "CONTROLLER",
      "pid": 2137201,
      "state": "RUNNING"
    },
    "instance-1": {
      "cluster_role": null,
      "mgmt_role": "AGENT",
      "pid": 2137200,
      "state": "RUNNING"
    },
    "logger-01": {
      "cluster_role": "LOGGER",
      "mgmt_role": null,
      "pid": 2137288,
      "state": "RUNNING"
    },
    "manager": {
      "cluster_role": "MANAGER",
      "mgmt_role": null,
      "pid": 2137289,
      "state": "RUNNING"
    },
    "worker-01": {
      "cluster_role": "WORKER",
      "mgmt_role": null,
      "pid": 2137291,
      "state": "RUNNING"
    },
    "worker-02": {
      "cluster_role": "WORKER",
      "mgmt_role": null,
      "pid": 2137290,
      "state": "RUNNING"
    }
  }
}