-
Notifications
You must be signed in to change notification settings - Fork 160
docs: Add syslog drainer documentation #569
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
base: master
Are you sure you want to change the base?
Conversation
Document configuration and usage of the syslog drainer for forwarding build logs to external syslog servers via TCP, UDP, or TLS transport. Fixes concourse#488 Signed-off-by: Mathias Bogaert <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I think I've validated that most of the info here is correct. I mostly cross-referenced by looking at the syslog code.
For transparency, can you list the LLM(s) used to assist you with writing this PR? TY!
| --syslog-ca-cert /etc/concourse/ca-cert2.pem | ||
| }}} | ||
|
|
||
| Environment variable: \code{CONCOURSE_SYSLOG_CA_CERT} (can be specified multiple times) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Env vars can't be specified multiple times. When using the env vars users need to pass in a comma separated list of file paths.
CONCOURSE_SYSLOG_CA_CERT=/etc/concourse/ca-cert1.pem,/etc/concourse/ca-cert2.pem
Example of this: https://concourse-ci.org/concourse-worker.html#pointing-to-external-dns-servers
| # Verify the component is configured (look for ComponentSyslogDrainer) | ||
| curl http://web-node:8080/api/v1/info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LLM hallucination? Internal components are not listed in the info endpoint. See:
- https://github.com/concourse/concourse/blob/750ce8b641a756fb26caa1571d91f8e0955f2ab8/atc/api/infoserver/info.go#L14-L19
- https://github.com/concourse/concourse/blob/750ce8b641a756fb26caa1571d91f8e0955f2ab8/atc/info.go
- https://github.com/concourse/concourse/blob/750ce8b641a756fb26caa1571d91f8e0955f2ab8/atc/feature_flags.go
| \section{ | ||
| \title{BOSH Deployment} | ||
|
|
||
| For BOSH deployments, configure in your deployment manifest: | ||
|
|
||
| \codeblock{yaml}{{{ | ||
| instance_groups: | ||
| - name: web | ||
| jobs: | ||
| - name: web | ||
| properties: | ||
| syslog: | ||
| address: syslog.example.com:514 | ||
| transport: tcp | ||
| hostname: concourse-prod | ||
| drain_interval: 30s | ||
| ca_certs: | ||
| - | | ||
| -----BEGIN CERTIFICATE----- | ||
| MIIDQTCCAimgAwIBAgITBmyfz... | ||
| -----END CERTIFICATE----- | ||
| }}} | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs as they currently are, avoid packaging specific instructions for both the Bosh release and Helm chart. Also kinda weird that you added steps for Bosh but not Helm. I'd remove this section.
| \section{ | |
| \title{BOSH Deployment} | |
| For BOSH deployments, configure in your deployment manifest: | |
| \codeblock{yaml}{{{ | |
| instance_groups: | |
| - name: web | |
| jobs: | |
| - name: web | |
| properties: | |
| syslog: | |
| address: syslog.example.com:514 | |
| transport: tcp | |
| hostname: concourse-prod | |
| drain_interval: 30s | |
| ca_certs: | |
| - | | |
| -----BEGIN CERTIFICATE----- | |
| MIIDQTCCAimgAwIBAgITBmyfz... | |
| -----END CERTIFICATE----- | |
| }}} | |
| } |
| Monitor the syslog drainer through: | ||
|
|
||
| \list{ | ||
| \bold{Web logs} - Look for \code{syslog.drainer} log entries for errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking at the code, I don't think the built-up logger would emit as syslog.drainer. The base name syslog is right (see), but I think the drainer part would actually be drain-build based on this line further down in the same file.
| \bold{Web logs} - Look for \code{syslog.drainer} log entries for errors | |
| \bold{Web logs} - Look for \code{syslog.drain} log entries for errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe the LLM was looking here? https://github.com/concourse/concourse/blob/750ce8b641a756fb26caa1571d91f8e0955f2ab8/atc/atccmd/command.go#L804-L807
Even then, it looks like the component name ends up as drainer-drainer (1, 2)
So in the logs the full string for this component might be drainer.drain.syslog.drain-build 😕
Anyways, definitely doesn't look like syslog.drainer would ever be found in the logs, unless I'm reading the code wrong, which is very possible! The way the logger builds up is stretched over many files 😅
Document configuration and usage of the syslog drainer for forwarding build logs to external syslog servers via TCP, UDP, or TLS transport.
Fixes #488