mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 04:28:15 +00:00
commiting initial draft of logging documentation.
This commit is contained in:
@@ -3,11 +3,11 @@ title: Elasticsearch
|
||||
weight: 200
|
||||
---
|
||||
|
||||
If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure it to log events from your cluster. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or containers.
|
||||
If your organization uses [Elasticsearch](https://www.elastic.co/), either on premise or in the cloud, you can configure it to log events from your cluster. Afterwards, you can log into your Elasticsearch deployment to view logs for cluster or container events.
|
||||
|
||||
## Configuring Elasticsearch Logging
|
||||
|
||||
You can configure Elasticsearch to log events at both the cluster level and the project level.
|
||||
You can configure Elasticsearch to log events at both the cluster and project level.
|
||||
|
||||
>**Prerequisites:** Configure an [Elasticsearch deployment](https://www.elastic.co/guide/en/cloud/saas-release/ec-create-deployment.html).
|
||||
|
||||
@@ -27,7 +27,7 @@ You can configure Elasticsearch to log events at both the cluster level and the
|
||||
|
||||
1. Complete the **Elasticsearch Configuration** form.
|
||||
|
||||
1. From the **Endpoint** field, enter the IP address and port for your Elasticsearch. You can copy this information from your the dashboard of your Elasticsearch deployment.
|
||||
1. From the **Endpoint** field, enter the IP address and port for your Elasticsearch instance. You can copy this information from the dashboard of your Elasticsearch deployment. Elasticsearch usually uses port `9243`.
|
||||
|
||||
1. If you are using [X-Pack Security](https://www.elastic.co/guide/en/x-pack/current/xpack-introduction.html), enter your Elasticsearch **Username** and **Password** for authentication.
|
||||
|
||||
@@ -37,13 +37,19 @@ You can configure Elasticsearch to log events at both the cluster level and the
|
||||
|
||||
1. Enter a private key and client certificate. Either copy and paste them or browse to them using **Read from a file**.
|
||||
|
||||
You can generate a key and certificate one 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. Enter your private key password.
|
||||
|
||||
1. If you want to verify connections to Elasticsearch, select the **Enabled - Input trusted server certificate** option and then enter your trusted server certificate.
|
||||
1. If you want to verify connections to Elasticsearch, select the **Enabled - Input trusted server certificate** option and then enter your **Trusted Server Certificate**.
|
||||
|
||||
1. Complete the **Additional Logging Configuration** form.
|
||||
|
||||
1. Use the **Add Field** button to add key value pairs that represent [custom log fields](http://docs.splunk.com/Documentation/AddOns/released/CiscoWSA/Configurew3clogfieldextractions) used to filter log events.
|
||||
1. Use the **Add Field** button to add key value pairs that represent custom log fields to filter log events.
|
||||
|
||||
1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ title: Embedded Elasticsearch
|
||||
weight: 100
|
||||
---
|
||||
|
||||
If your organization doesn't have any logging solutions, you can use Rancher's Embedded Elasticsearch option to log record from your cluster. This option sets up an instance of [Elasticsearch](https://www.elastic.co/) within your cluster, and then uses cluster resources to run it.
|
||||
If your organization doesn't have any logging solutions, you can use Rancher's Embedded Elasticsearch option to log records from your cluster. This option sets up an instance of [Elasticsearch](https://www.elastic.co/) within your cluster, and then uses cluster resources to run it.
|
||||
|
||||
>**Notes:**
|
||||
>
|
||||
@@ -26,7 +26,7 @@ If your organization doesn't have any logging solutions, you can use Rancher's E
|
||||
|
||||
1. Complete the **Embedded Elasticsearch Configuration** form.
|
||||
|
||||
1. From **CPUs and Memory**, set the CPU and memory that elasticsearch can access within your cluster for logging.
|
||||
1. From **CPUs and Memory**, set the CPU and memory that Elasticsearch can access within your cluster for logging. CPU and memory must meet the prerequisites above.
|
||||
|
||||
1. Enter an [Index Pattern](https://www.elastic.co/guide/en/kibana/current/index-patterns.html).
|
||||
|
||||
@@ -40,4 +40,4 @@ If your organization doesn't have any logging solutions, you can use Rancher's E
|
||||
|
||||
**Result:** Rancher is now configured to send cluster and container events to Embedded Elasticsearch for logging.
|
||||
|
||||
You can view your logs by clicking the **Elasticsearch Endpoint** and **Kibana Endpoint** links available on the **Cluster Logging** page.
|
||||
You can view your logs by clicking the **Elasticsearch Endpoint** and **Kibana Endpoint** links available on the **Cluster Logging** page, which should be the page you're viewing now.
|
||||
@@ -3,11 +3,11 @@ title: Kafka
|
||||
weight: 400
|
||||
---
|
||||
|
||||
You can configure a Kafka server to log events that occur in your Kubernetes cluster.
|
||||
You can configure a [Kafka](https://kafka.apache.org/) to log events that occur in your Kubernetes cluster.
|
||||
|
||||
## Configuring Kafka Logging
|
||||
|
||||
You can configure Kafka to log events at both the cluster level and the project level.
|
||||
You can configure Kafka to log events at both the cluster and project level.
|
||||
|
||||
>**Prerequisite:** You must have a Kafka server configured.
|
||||
|
||||
@@ -37,8 +37,10 @@ You can configure Kafka to log events at both the cluster level and the project
|
||||
|
||||
1. Complete the **Additional Logging Configuration** form.
|
||||
|
||||
1. Use the **Add Field** button to add key value pairs that represent [custom log fields](https://httpd.apache.org/docs/2.4/mod/mod_log_config.html) used to filter log events.
|
||||
1. **Optional**: Use the **Add Field** button to add key value pairs that represent custom log fields used to filter log events.
|
||||
|
||||
1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed.
|
||||
|
||||
1. Click **Save**.
|
||||
1. Click **Save**.
|
||||
|
||||
**Result:** Rancher is now configured to send events to Kafka for logging. View your Kafka stream to view events for your cluster and containers.
|
||||
|
||||
@@ -5,11 +5,11 @@ aliases:
|
||||
- /rancher/v2.x/en/tasks/logging/splunk/
|
||||
---
|
||||
|
||||
If your organization uses [Splunk](https://www.splunk.com/), you can configure it to log events from a cluster or project in Rancher. Afterwards events are logged, you can use Splunk to view data from cluster and containers.
|
||||
If your organization uses [Splunk](https://www.splunk.com/), you can configure it to log events from a cluster or project in Rancher. Afterwards events are logged, you can use Splunk to view log events about your cluster and containers.
|
||||
|
||||
## Configuring Splunk Logging
|
||||
|
||||
You can configure Splunk to log events at both the cluster level and the project level.
|
||||
You can configure Splunk to log events at both the cluster and project level.
|
||||
|
||||
>**Prerequisites:**
|
||||
>
|
||||
@@ -34,25 +34,25 @@ You can configure Splunk to log events at both the cluster level and the project
|
||||
|
||||
1. Complete the **Splunk HTTP Event Collector Configuration** form.
|
||||
|
||||
1. From the **Endpoint** field, enter the IP address and port for you syslog server (i.e. `http://splunk-server:8088`)
|
||||
1. From the **Endpoint** field, enter the IP address and port for you Splunk instance (i.e. `http://splunk-server:8088`)
|
||||
|
||||
If you're using Splunk Cloud, you'll need to work with [Splunk support](https://www.splunk.com/en_us/support-and-services.html) to get an endpoint URL.
|
||||
Splunk usually uses port `8088`. If you're using Splunk Cloud, you'll need to work with [Splunk support](https://www.splunk.com/en_us/support-and-services.html) to get an endpoint URL.
|
||||
|
||||
1. Enter the **Token** you obtained while completing the prerequisites.
|
||||
1. Enter the **Token** you obtained while completing the prerequisites(i.e., when you created a token in Splunk).
|
||||
|
||||
1. From the **Source** field, enter the name of the token as entered in Splunk.
|
||||
|
||||
1. **Optional:** Enter an index that's within the scope of your token.
|
||||
1. **Optional:** Enter one or more [index](http://docs.splunk.com/Documentation/Splunk/7.1.2/Indexer/Aboutindexesandindexers) that's allowed for your token.
|
||||
|
||||
1. Complete the **Additional Logging Configuration** form.
|
||||
|
||||
1. 1. Use the **Add Field** button to add key value pairs that represent [custom log fields](http://docs.splunk.com/Documentation/Splunk/7.1.2/Data/Configureindex-timefieldextraction) used to filter log events.
|
||||
1. Use the **Add Field** button to add key value pairs that represent custom log fields used to filter log events.
|
||||
|
||||
1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed.
|
||||
|
||||
1. Click **Save**.
|
||||
|
||||
**Result:** Rancher is now configured to send cluster and container events to Splunk for logging.
|
||||
**Result:** Rancher is now configured to send events to Splunk for logging. Log into your Spunk instance to view events for your cluster and containers.
|
||||
|
||||
## Viewing Logs
|
||||
|
||||
|
||||
@@ -12,15 +12,12 @@ You can configure Syslog to log events at both the cluster level and the project
|
||||
>**Prerequisite:** You must have a Syslog server configured.
|
||||
|
||||
1. Browse to the cluster or project that you want to log.
|
||||
|
||||
{{% accordion id="cluster" label="To 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:" %}}
|
||||
|
||||
1. From the **Global** view, open the project that you want to configure logging for.
|
||||
@@ -33,17 +30,22 @@ You can configure Syslog to log events at both the cluster level and the project
|
||||
|
||||
1. Complete the **Syslog Configuration** form.
|
||||
|
||||
1. From the **Endpoint** field, enter the IP address and port for you Syslog server. Additionally, select the protocol that your Syslog server uses from the drop-down.
|
||||
1. From the **Endpoint** field, enter the IP address and port for your Syslog server. Additionally, select the protocol that your Syslog server uses from the drop-down.
|
||||
|
||||
1. From the **Program** field, enter the name of the application logging events to your Syslog server.
|
||||
1. From the **Program** field, enter the name of the application logging events to your Syslog server (i.e., Rancher).
|
||||
|
||||
1. Enter a **Token** that authenticates with your Syslog server.
|
||||
1. If you are using a cloud logging service (i.e., [Sumologic](https://www.sumologic.com/)), enter a **Token** that authenticates with your Syslog server. Use the cloud logging service to create this token.
|
||||
|
||||
1. Select a **Log Severity** for events that are logged to the Syslog server. For more information on each severity level, see the [Syslog protocol documentation](https://tools.ietf.org/html/rfc5424#page-11).
|
||||
|
||||
1. If your Syslog server uses **TCP** protocol, complete the **SSL Configuration** form.
|
||||
|
||||
1. Enter a private key and client certificate.
|
||||
1. Enter a private key and client certificate. Either copy and paste them or browse to them using **Read from a file**.
|
||||
|
||||
You can generate a key and client 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 want to verify connections to the Syslog service, select the **Enabled - Input trusted server certificate** option and then enter your truster server certificate.
|
||||
|
||||
@@ -53,4 +55,6 @@ You can configure Syslog to log events at both the cluster level and the project
|
||||
|
||||
1. Enter a **Flush Interval**. This value determines how often the buffered logs are flushed.
|
||||
|
||||
1. Click **Save**.
|
||||
1. Click **Save**.
|
||||
|
||||
**Result:** Rancher is now configured to send events to Syslog for logging. View your Syslog stream to view events for your cluster and containers.
|
||||
Reference in New Issue
Block a user