From 45d4eef26b27a1520ad768323b56805fc1b44610 Mon Sep 17 00:00:00 2001 From: Denise Schannon Date: Sat, 23 Mar 2019 00:35:46 -0700 Subject: [PATCH] fixing logging --- .../en/cluster-admin/tools/logging/_index.md | 36 ++++++-- .../tools/logging/custom/_index.md | 90 ------------------- .../tools/logging/elasticsearch/_index.md | 6 +- .../tools/logging/fluentd/_index.md | 4 +- .../tools/logging/kafka/_index.md | 7 +- .../tools/logging/splunk/_index.md | 2 - .../tools/logging/syslog/_index.md | 8 +- .../en/project-admin/tools/logging/_index.md | 36 ++++++-- 8 files changed, 70 insertions(+), 119 deletions(-) delete mode 100644 content/rancher/v2.x/en/cluster-admin/tools/logging/custom/_index.md diff --git a/content/rancher/v2.x/en/cluster-admin/tools/logging/_index.md b/content/rancher/v2.x/en/cluster-admin/tools/logging/_index.md index 709c023056c..937f56293a7 100644 --- a/content/rancher/v2.x/en/cluster-admin/tools/logging/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/tools/logging/_index.md @@ -62,13 +62,35 @@ As an [administrator]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/global 1. Select a logging service and enter the configuration. Refer to the specific service for detailed configuration. Rancher supports the following services: - - [Elasticsearch]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/elasticsearch) - - [Splunk]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/splunk) - - [Kafka]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/kafka) - - [Syslog]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/syslog) - - [Fluentd]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/fluentd) + - [Elasticsearch]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/elasticsearch/) + - [Splunk]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/splunk/) + - [Kafka]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/kafka/) + - [Syslog]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/syslog/) + - [Fluentd]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/fluentd/) -1. Complete the **Additional Logging Configuration** form. +1. (Optional) Instead of using the UI to configure the logging services, you can enter custom advanced configurations by clicking on **Edit as File**, which is located above the logging targets. This link is only visible after you select a logging service. + + - With the file editor, enter raw fluentd configuration for any logging service. Refer to the documentation for each logging service on how to setup the output configuration. + + - [Elasticsearch Documentation](https://github.com/uken/fluent-plugin-elasticsearch) + - [Splunk Documentation](https://github.com/fluent/fluent-plugin-splunk) + - [Kafka Documentation](https://github.com/fluent/fluent-plugin-kafka) + - [Syslog Documentation](https://github.com/dlackty/fluent-plugin-remote_syslog) + - [Fluentd Documentation](https://docs.fluentd.org/v1.0/articles/out_forward) + + - If the logging service is using TLS, you also need to complete the **SSL Configuration** form. + 1. Provide the **Client Private Key** and **Client Certificate**. You can either copy and paste them or upload them by using the **Read from a file** button. + + - You can use either a self-signed certificate or one provided by a certificate authority. + + - You can generate a self-signed certificate using an openssl command. For example: + + ``` + openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" + ``` + 2. If you are using a self-signed certificate, provide the **CA Certificate PEM**. + +1. (Optional) Complete the **Additional Logging Configuration** form. 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. @@ -78,6 +100,8 @@ As an [administrator]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/global 1. Click **Test**. Rancher sends a test log to the service. + > **Note:** This button is replaced with _Dry Run_ if you are using the custom configuration editor. In this case, Rancher calls the fluentd dry drun command to validate the configuration. + 1. Click **Save**. **Result:** Rancher is now configured to send logs to the selected service. Log into the logging service so that you can start viewing the logs. diff --git a/content/rancher/v2.x/en/cluster-admin/tools/logging/custom/_index.md b/content/rancher/v2.x/en/cluster-admin/tools/logging/custom/_index.md deleted file mode 100644 index c78302fb630..00000000000 --- a/content/rancher/v2.x/en/cluster-admin/tools/logging/custom/_index.md +++ /dev/null @@ -1,90 +0,0 @@ ---- -title: Custom -weight: 700 ---- - -_Available as of v2.2.0_ - -You can configure Rancher to send Kubernetes logs to Elasticsearch, Splunk, Kafka, Syslog or Fluentd. - -## Configuring Advance Mode - -You can configure Rancher to send cluster or project logs to one of the logging targets in advance mode by inputting raw fluentd configuration. - ->**Prerequisite:** You must have a one of the logging targets of Elasticsearch, Splunk, Kafka, Syslog and Fluentd server configured. - -1. Browse to the cluster or project. -{{% accordion id="cluster" label="To Configure Cluster Logging:" %}} -If you're a [cluster owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#cluster-roles) who works in operations or security, configure cluster logging. - -1. From the **Global** view, open the cluster that you want to configure logging for. - -1. From the main menu, select **Tools > Logging**. - -{{% /accordion %}} -{{% accordion id="project" label="To Configure Project Logging:" %}} -If you're a [project owner or member]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/cluster-project-roles/#project-roles) who works on an application, configure project logging. - -1. From the **Global** view, open the project that you want to configure logging for. - -1. From the main menu, select **Tools > Logging**. - -{{% /accordion %}} - -1. Select one of the logging targets, giving example for **Elasticsearch**. - -1. Click the **Edit as File**. - - 1. Input the Fluentd output configuration. - - 1. Giving an example for **Elasticsearch** target. - - ```sh - @type elasticsearch - include_tag_key true - user elasticsearch - password PleaseChaneMe - hosts https://rancher.com:9200 - logstash_format true - logstash_prefix elastic-index - logstash_dateformat %Y-%m-%d - type_name container_log - - ``` - - 1. For Elasticsearch configuration, see [Elasticsearch Documentation](https://github.com/uken/fluent-plugin-elasticsearch) for details. - - 1. For Splunk configuration, see [Splunk Documentation](https://github.com/fluent/fluent-plugin-splunk) for details. - - 1. For Kafka configuration, see [Kafka Documentation](https://github.com/fluent/fluent-plugin-kafka) for details. - - 1. For Syslog configuration, see [Syslog Documentation](https://github.com/dlackty/fluent-plugin-remote_syslog) for details. - - 1. For Fluentd configuration, see [Fluentd Documentation](https://docs.fluentd.org/v1.0/articles/out_forward) for details. - -1. If your logging server is using TLS, you need to complete the **SSL Configuration** form. - - 1. Enter the private key and client certificate. You can either copy and paste them or upload them by **Read from a file**. - - You can use either a self-signed certificate or one provided by a certificate authority. - - You can generate a self-signed certificate using an openssl command. For example: - - openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" - - - 1. If you are using a self-signed certificate, you need to provide the **CA Certificate PEM** as well. - -1. Complete the **Additional Logging Configuration** form. - - 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. - - 1. Enter a **Flush Interval**. This value determines how often [Fluentd](https://www.fluentd.org/) flushes data to the logging server. Intervals are measured in seconds. - - 1. **Include System Log**. The logs from pods in system project and RKE components will be sent to the target. Uncheck it to exclude the system logs. - -1. Click **Dry Run**. Rancher calls the fluentd dry run command to validate the configuration. - -1. Click **Save**. - -**Result:** Rancher is now configured to send logs to your configured server. View your server to see logs for your cluster and containers. diff --git a/content/rancher/v2.x/en/cluster-admin/tools/logging/elasticsearch/_index.md b/content/rancher/v2.x/en/cluster-admin/tools/logging/elasticsearch/_index.md index 50fe7b5443a..95e0d55b2cf 100644 --- a/content/rancher/v2.x/en/cluster-admin/tools/logging/elasticsearch/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/tools/logging/elasticsearch/_index.md @@ -9,7 +9,7 @@ If your organization uses [Elasticsearch](https://www.elastic.co/), either on pr >**Prerequisites:** Configure an [Elasticsearch deployment](https://www.elastic.co/guide/en/cloud/saas-release/ec-create-deployment.html). -## Elasticsearch Configuration +## Elasticsearch Deployment Configuration 1. In the **Endpoint** field, enter the IP address and port of your Elasticsearch instance. You can find this information from the dashboard of your Elasticsearch deployment. @@ -32,12 +32,12 @@ If your instance of Elasticsearch uses SSL, your **Endpoint** will need to begin ``` openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" ``` - + 1. Enter your **Client Key Password**. 1. Enter your **SSL Version**. The default version is `TLSv1_2`. -1. Select whether or not you want to verify your SSL. If the **Enabled - Input trusted server certificate** option is selected, a certificate section is enabled. You can copy and paste the certificate or upload it using the **Read from a file** button. +1. Select whether or not you want to verify your SSL. If the **Enabled - Input trusted server certificate** option is selected, a certificate section, i.e. **Ca Certificate PEM** is displayed. You can copy and paste the certificate or upload it using the **Read from a file** button. * If you are using a self-signed certificate, provide the **CA Certificate PEM**. * If you are using a certificate from a certificate authority, provide your **Trusted Server Certificate Chain**. diff --git a/content/rancher/v2.x/en/cluster-admin/tools/logging/fluentd/_index.md b/content/rancher/v2.x/en/cluster-admin/tools/logging/fluentd/_index.md index 5dd086cdbb6..f619ddc3425 100644 --- a/content/rancher/v2.x/en/cluster-admin/tools/logging/fluentd/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/tools/logging/fluentd/_index.md @@ -29,6 +29,4 @@ After adding all the Fluentd servers, you have the option to select **Enable Gzi ## SSL Configuration -If your Fluentd servers are using TLS, you need to select **Use TLS**. You can copy and paste the certificate or upload it using the **Read from a file** button. - - - If you are using a self-signed certificate, provide the **CA Certificate PEM**. +If your Fluentd servers are using TLS, you need to select **Use TLS**. If you are using a self-signed certificate, provide the **CA Certificate PEM**. You can copy and paste the certificate or upload it using the **Read from a file** button. diff --git a/content/rancher/v2.x/en/cluster-admin/tools/logging/kafka/_index.md b/content/rancher/v2.x/en/cluster-admin/tools/logging/kafka/_index.md index bd15fdac559..71358a6c721 100644 --- a/content/rancher/v2.x/en/cluster-admin/tools/logging/kafka/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/tools/logging/kafka/_index.md @@ -9,7 +9,7 @@ If your organization uses [Kafka](https://kafka.apache.org/), you can configure >**Prerequisite:** You must have a Kafka server configured. -## Kafka Configuration +## Kafka Server Configuration 1. Select the type of **Endpoint** your Kafka server is using: @@ -34,10 +34,7 @@ If your Kafka cluster is using SSL for the **Broker**, you need to complete the openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" ``` -1. In the **CA Certificate PEM** certificate section, either copy and paste the certificate or upload it using the **Read from a file** button. - - * If you are using a self-signed certificate, provide the **CA Certificate PEM**. - * If you are using a certificate from a certificate authority, provide your **Trusted Server Certificate Chain**. +1. If you are using a self-signed certificate, provide the **CA Certificate PEM**. You can either copy and paste the certificate or upload it using the **Read from a file** button. ### SASL configuration diff --git a/content/rancher/v2.x/en/cluster-admin/tools/logging/splunk/_index.md b/content/rancher/v2.x/en/cluster-admin/tools/logging/splunk/_index.md index 096c8107120..d78f46b31bf 100644 --- a/content/rancher/v2.x/en/cluster-admin/tools/logging/splunk/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/tools/logging/splunk/_index.md @@ -43,8 +43,6 @@ If your instance of Splunk uses SSL, your **Endpoint** will need to begin with ` 1. Enter your **Client Key Password**. -1. Enter your **SSL Version**. The default version is `TLSv1_2`. - 1. Select whether or not you want to verify your SSL. If the **Enabled - Input trusted server certificate** option is selected, a certificate section is enabled. You can copy and paste the certificate or upload it using the **Read from a file** button. * If you are using a self-signed certificate, provide the **CA Certificate PEM**. diff --git a/content/rancher/v2.x/en/cluster-admin/tools/logging/syslog/_index.md b/content/rancher/v2.x/en/cluster-admin/tools/logging/syslog/_index.md index d9d23200cd1..cf84b1b9a51 100644 --- a/content/rancher/v2.x/en/cluster-admin/tools/logging/syslog/_index.md +++ b/content/rancher/v2.x/en/cluster-admin/tools/logging/syslog/_index.md @@ -11,7 +11,7 @@ If your organization uses [Syslog](https://tools.ietf.org/html/rfc5424), you can If you are using rsyslog, please make sure your rsyslog authentication mode is `x509/name`. -## Syslog Configuration +## Syslog Server Configuration 1. In the **Endpoint** field, enter the IP address and port for your Syslog server. Additionally, in the dropdown, select the protocol that your Syslog server uses. @@ -39,6 +39,8 @@ If your Syslog server is using **TCP** protocol and uses TLS, you need to select ``` openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" ``` -1. Enter your private key password. -1. If you are using a self-signed certificate, you need to select the **Enabled - Input trusted server certificate** option and provide your **CA Certificate PEM** certificate. You can copy and paste the certificate or upload it using the **Read from a file** button +1. Select whether or not you want to verify your SSL. If the **Enabled - Input trusted server certificate** option is selected, a certificate section is enabled. You can copy and paste the certificate or upload it using the **Read from a file** button. + + * If you are using a self-signed certificate, provide the **CA Certificate PEM**. + * If you are using a certificate from a certificate authority, provide your **Trusted Server Certificate Chain**. diff --git a/content/rancher/v2.x/en/project-admin/tools/logging/_index.md b/content/rancher/v2.x/en/project-admin/tools/logging/_index.md index e59aca33d95..8a0ccc2c7fd 100644 --- a/content/rancher/v2.x/en/project-admin/tools/logging/_index.md +++ b/content/rancher/v2.x/en/project-admin/tools/logging/_index.md @@ -57,15 +57,35 @@ As an [administrator]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/global 1. Select a logging service and enter the configuration. Refer to the specific service for detailed configuration. Rancher supports the following services: - > **Note:** Configuring logging for a specific service is the same for a cluster or a project. + - [Elasticsearch]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/elasticsearch/) + - [Splunk]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/splunk/) + - [Kafka]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/kafka/) + - [Syslog]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/syslog/) + - [Fluentd]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/fluentd/) - - [Elasticsearch]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/elasticsearch) - - [Splunk]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/splunk) - - [Kafka]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/kafka) - - [Syslog]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/syslog) - - [Fluentd]({{< baseurl >}}/rancher/v2.x/en/cluster-admin/tools/logging/fluentd) +1. (Optional) Instead of using the UI to configure the logging services, you can enter custom advanced configurations by clicking on **Edit as File**, which is located above the logging targets. This link is only visible after you select a logging service. -1. Complete the **Additional Logging Configuration** form. + - With the file editor, enter raw fluentd configuration for any logging service. Refer to the documentation for each logging service on how to setup the output configuration. + + - [Elasticsearch Documentation](https://github.com/uken/fluent-plugin-elasticsearch) + - [Splunk Documentation](https://github.com/fluent/fluent-plugin-splunk) + - [Kafka Documentation](https://github.com/fluent/fluent-plugin-kafka) + - [Syslog Documentation](https://github.com/dlackty/fluent-plugin-remote_syslog) + - [Fluentd Documentation](https://docs.fluentd.org/v1.0/articles/out_forward) + + - If the logging service is using TLS, you also need to complete the **SSL Configuration** form. + 1. Provide the **Client Private Key** and **Client Certificate**. You can either copy and paste them or upload them by using the **Read from a file** button. + + - You can use either a self-signed certificate or one provided by a certificate authority. + + - You can generate a self-signed certificate using an openssl command. For example: + + ``` + openssl req -x509 -newkey rsa:2048 -keyout myservice.key -out myservice.cert -days 365 -nodes -subj "/CN=myservice.example.com" + ``` + 2. If you are using a self-signed certificate, provide the **CA Certificate PEM**. + +1. (Optional) Complete the **Additional Logging Configuration** form. 1. **Optional:** Use the **Add Field** button to add custom log fields to your logging configuration. These fields are key value pairs (such as `foo=bar`) that you can use to filter the logs from another system. @@ -75,6 +95,8 @@ As an [administrator]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/global 1. Click **Test**. Rancher sends a test log to the service. + > **Note:** This button is replaced with _Dry Run_ if you are using the custom configuration editor. In this case, Rancher calls the fluentd dry drun command to validate the configuration. + 1. Click **Save**. **Result:** Rancher is now configured to send logs to the selected service. Log into the logging service so that you can start viewing the logs.