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

Add access log for rest and router connections #1835

Closed
plorenz opened this issue Mar 15, 2024 · 2 comments
Closed

Add access log for rest and router connections #1835

plorenz opened this issue Mar 15, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request metrics/reporting

Comments

@plorenz
Copy link
Member

plorenz commented Mar 15, 2024

Add access logs to the controller, logging the following connections to controllers:

  1. Identity (REST API)
  2. Router
  3. Controller peers

Event Type reference:

type ConnectSource string

const (
	ConnectEventNS                      = "connect"
	ConnectSourceRouter   ConnectSource = "router"
	ConnectSourcePeer     ConnectSource = "peer"
	ConnectSourceIdentity ConnectSource = "identity"
)

type ConnectEvent struct {
	Namespace string        `json:"namespace"`
	SrcType   ConnectSource `json:"src_type"`
	SrcId     string        `json:"src_id"`
	SrcAddr   string        `json:"src_addr"`
	DstId     string        `json:"dst_id"`
	DstAddr   string        `json:"dst_addr"`
	Timestamp time.Time     `json:"timestamp"`
}

Example events:

{
  "namespace": "connect",
  "src_type": "identity",
  "src_id": "ji2Rt8KJ4",
  "src_addr": "127.0.0.1:59336",
  "dst_id": "ctrl_client",
  "dst_addr": "localhost:1280/edge/management/v1/edge-routers/2L7NeVuGBU",
  "timestamp": "2024-10-02T12:17:39.501821249-04:00"
}
{
  "namespace": "connect",
  "src_type": "router",
  "src_id": "2L7NeVuGBU",
  "src_addr": "127.0.0.1:42702",
  "dst_id": "ctrl_client",
  "dst_addr": "127.0.0.1:6262",
  "timestamp": "2024-10-02T12:17:40.529865849-04:00"
}
{
  "namespace": "connect",
  "src_type": "peer",
  "src_id": "ctrl2",
  "src_addr": "127.0.0.1:40056",
  "dst_id": "ctrl1",
  "dst_addr": "127.0.0.1:6262",
  "timestamp": "2024-10-02T12:37:04.490859197-04:00"
}
@plorenz plorenz added enhancement New feature or request metrics/reporting labels Mar 15, 2024
@plorenz plorenz self-assigned this Mar 15, 2024
@plorenz plorenz changed the title Add ip address to router connected events Add access log for rest and router connections Mar 27, 2024
@r-caamano
Copy link
Member

Any guidance on when this feature will be added?

@plorenz
Copy link
Member Author

plorenz commented May 7, 2024

Any guidance on when this feature will be added?

I'll see if I can get it in the next release with HA Beta 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request metrics/reporting
Projects
Status: Done
Development

No branches or pull requests

2 participants