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

log receiver service #527

Closed
Ulexus opened this issue Jul 20, 2021 · 3 comments · Fixed by #650
Closed

log receiver service #527

Ulexus opened this issue Jul 20, 2021 · 3 comments · Fixed by #650
Assignees
Labels
enhancement New feature or request

Comments

@Ulexus
Copy link
Contributor

Ulexus commented Jul 20, 2021

Sidero should offer a logging service which accepts logs from managed machines and stores them to either (configurable) RAM-based ring buffer or disk storage.

These logs should be grouped by Cluster and by Machine.

The design of Loki seems like it fits well with the needs here, and Loki offers some useful storage backends, while being substantially lighter weight than other log aggregators like ElasticSearch. So perhaps the options should be ring buffer, disk file, or Loki.

In any case, we need both client and server sides of this feature: Sidero should act as a log server to broker and direct logs. It should configure Environments and Talos installations to set netconsole= kernel commandline flags to its log service. Thus, no client-side service is required (though we may wish to add in other logs later), just the kernel config.

@Ulexus Ulexus added the enhancement New feature or request label Jul 20, 2021
@smira
Copy link
Member

smira commented Oct 19, 2021

Also additional questions:

  • how do we query these logs? do we need separate CLI tool?
  • can we somehow make these logs go into Kubernetes? can we e.g. schedule a pod which dumps server logs to stderr, so that kubectl logs can be used to view the logs (and it solved the storage issue as well)

@smira
Copy link
Member

smira commented Oct 19, 2021

@smira smira changed the title Log service log service (netconsole) Oct 20, 2021
@smira
Copy link
Member

smira commented Oct 27, 2021

  • receiver for log messages
  • receiver matches source IP address with SideoLink IPs and figures out Server, enhances JSON log message with:
    • Server UUID
    • Server hostname (if available)
    • Machine name (if available)
    • Cluster name (if available)
  • receiver outputs logs to its stderr, so that logs can be accessed with kubectl logs on that container and forwarded to log system for archival

@smira smira changed the title log service (netconsole) log receiver service Oct 27, 2021
@smira smira self-assigned this Nov 25, 2021
smira added a commit to smira/siderolink that referenced this issue Nov 25, 2021
smira added a commit to smira/sidero that referenced this issue Nov 26, 2021
Fixes siderolabs#527

Talos logs (see siderolabs/talos#4600) are
delivered to Sidero over the SideroLink tunnel.

Logs can be seen with:

```
$ kubectl logs -n sidero-system deployment/sidero-controller-manager -c serverlogs -f
{"clock":67194673,"cluster":"management-cluster","facility":"user","machine":"default/management-cluster-cp-4j8f4","metal_machine":"default/management-cluster-cp-hbq57","msg":"[talos] phase bootloader (19/19): done, 176.795226ms\n","priority":"warning","seq":768,"server_uuid":"5b72932a-c482-4aa5-b00e-4b8773d3ac48","talos-level":"warn","talos-time":"2021-11-26T19:34:42.444342392Z"}
```

Logs are annotated on the fly with the information about `Server`,
`MetalMachine`, `Machine` and `Cluster`.

Signed-off-by: Andrey Smirnov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants