Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1844449

Summary: Wrong hostname value "fluentd-4nzfz" in examples when "Forwarding logs using the syslog protocol"
Product: OpenShift Container Platform Reporter: Oscar Casal Sanchez <ocasalsa>
Component: DocumentationAssignee: Lindsey Barbee-Vargas <lbarbeev>
Status: CLOSED CURRENTRELEASE QA Contact: Anping Li <anli>
Severity: medium Docs Contact: Vikram Goyal <vigoyal>
Priority: low    
Version: 4.4CC: aos-bugs, jokerman, rdlugyhe
Target Milestone: ---   
Target Release: 4.4.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-09 18:31:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Oscar Casal Sanchez 2020-06-05 12:51:02 UTC
[Document URL]
For OCP 4.4:
  https://docs.openshift.com/container-platform/4.4/logging/config/cluster-logging-external.html#cluster-logging-collector-syslog_cluster-logging-external

For OCP 4.3:
  https://docs.openshift.com/container-platform/4.3/logging/config/cluster-logging-external.html#cluster-logging-collector-syslog_cluster-logging-external


[Section Number and Name]
For OCP 4.4
  Forwarding logs using the syslog protocol

For OCP 4.3:
  Forwarding logs using the syslog protocol


[Describe the issue]

In the examples to forward the logs outside using the syslog protocol, the hostname value is wrong "hostname fluentd-4nzfz":

<store>
@type syslog_buffered 
remote_syslog rsyslogserver.openshift-logging.svc.cluster.local 
port 514 
hostname fluentd-4nzfz 
remove_tag_prefix tag 
tag_key ident,systemd.u.SYSLOG_IDENTIFIER 
facility local0 
severity info 
use_record true 
payload_key message 
</store>


Then, "hostname fluentd-4nzfz" should be replaced by "hostname ${hostname}". The complete example should be:

<store>
@type syslog_buffered 
remote_syslog rsyslogserver.openshift-logging.svc.cluster.local 
port 514 
hostname ${hostname} 
remove_tag_prefix tag 
tag_key ident,systemd.u.SYSLOG_IDENTIFIER 
facility local0 
severity info 
use_record true 
payload_key message 
</store>


This should be replaced in all the examples that are written in the documentation.

Comment 1 Lindsey Barbee-Vargas 2020-10-30 18:00:09 UTC
Made changes as described: Changed instances of "hostname fluentd-4nzfz" to "hostname ${hostname}" in examples to forward the logs outside using the syslog protocol. Moving this bug to MODIFIED. This can be reviewed in the following PRs:

4.4 - https://github.com/openshift/openshift-docs/pull/26835
4.5 - https://github.com/openshift/openshift-docs/pull/26836
4.6 & 4.7 - https://github.com/openshift/openshift-docs/pull/26828

The documentation has changed from 4.4 to 4.6, so there are multiple PRs for this BZ.

Oscar, to confirm, does the user include `${hostname}` exactly or is this a variable that is modified by the user? For example, instead of using `hostname ${hostname}` in the documentation examples, should we have `hostname <hostname>`, whereas `<hostname>` needs to be modified by the user in their files?

Comment 2 Oscar Casal Sanchez 2020-10-30 20:11:32 UTC
Hello Lindsey,

It must be literally `${hostname}` since it's a variable that it's later replace by the system to put the hostname where it's running, then, the user mustn't modify this variable.

Regards,
Oscar

Comment 3 Lindsey Barbee-Vargas 2020-11-03 20:13:48 UTC
Thank you for the clarification, Oscar. I'll keep it as `${hostname}`.

Comment 5 Rolfe Dlugy-Hegwer 2021-02-10 19:28:37 UTC
Made further corrections to modules/cluster-logging-collector-legacy-syslog.adoc for https://issues.redhat.com/browse/RHDEVDOCS-2604. Also see https://github.com/openshift/openshift-docs/pull/29385/files.