|
1 |
| -# ELK integration |
2 |
| - |
3 |
| -**PLEASE NOTE** This page is a work in progress, we have some rough notes in here, we are working on writing better doc for how to set up this integration. |
4 |
| - |
5 |
| -TODO Update this whole section |
6 |
| -Turn on Logstash in operator |
7 |
| -Add the ENABLE_LOGSTASH env in weblogic-operator.yaml to the env section |
8 |
| -name: ENABLE_LOGSTASH value: "true" |
9 |
| -Create the PV and PVC for the operator logs |
10 |
| -kubectl create -f elk-pv.yaml |
11 |
| -Verify if PV and PVC are created kubectl get pv -n weblogic-operator kubectl get pvc -n weblogic-operator |
12 |
| -Deploying the ELK stack |
13 |
| -ELK stack consists of Elasticsearch, Logstash, and Kibana. Logstash is configured to pickup logs from the operator and push to Elasticsearch. Kibana is setup to connect to Elasticsearch to read the log and shows it on the dashboard. |
14 |
| -Deploying Elasticsearch |
15 |
| -kubectl create -f elasticsearch.yaml |
16 |
| -Deploying Kibana |
17 |
| -kubectl create -f kibana.yaml |
18 |
| -Deploying Logstash |
19 |
| -kubectl create -f logstash.yaml |
20 |
| -Verify if ELK stack pods are created and running kubectl get pods -n weblogic-operator kubectl get pods |
21 |
| -Accessing the Kibana dashboard |
22 |
| -Get the NodePort from kibana services kubectl describe service kibana |
23 |
| -Access Kibana dashboard using NodePort from output of the above kubctl command and the hostname http://hostname:NodePort (eg. http://slcac571:30211) |
24 |
| -Select the Management tab to configure an index pattern. You will see logstash-* prepopulated, select the time filter then press the create button Then select the Discover tab to see the logs |
| 1 | +# Elastic Stack integration |
| 2 | + |
| 3 | +**PLEASE NOTE**: This page is a work in progress. We have some rough notes in here and are working on writing better documentation for how to set up this integration. |
| 4 | + |
| 5 | + |
| 6 | +## Turn on Logstash in the operator |
| 7 | + |
| 8 | +In `weblogic-operator.yaml`, add `ENABLE_LOGSTASH` in the `env` section: |
| 9 | + |
| 10 | +`name: ENABLE_LOGSTASH value: "true"` |
| 11 | + |
| 12 | +## Create the PV and PVC for the operator logs |
| 13 | + |
| 14 | +`kubectl create -f elk-pv.yaml` |
| 15 | + |
| 16 | +Verify that the PV and PVC are created: |
| 17 | + |
| 18 | +`kubectl get pv -n weblogic-operator kubectl get pvc -n weblogic-operator` |
| 19 | + |
| 20 | +## Deploy the Elastic Stack |
| 21 | + |
| 22 | +The Elastic Stack consists of Elasticsearch, Logstash, and Kibana. Logstash is configured to pickup logs from the operator and push them to Elasticsearch. Kibana connects to Elasticsearch to read the logs and displays them on the dashboard. |
| 23 | + |
| 24 | +### Deploy Elasticsearch |
| 25 | + |
| 26 | +`kubectl create -f elasticsearch.yaml` |
| 27 | + |
| 28 | +### Deploy Kibana |
| 29 | + |
| 30 | +`kubectl create -f kibana.yaml` |
| 31 | + |
| 32 | +### Deploy Logstash |
| 33 | + |
| 34 | +`kubectl create -f logstash.yaml` |
| 35 | + |
| 36 | +Verify that the Elastic Stack pods are created and running: |
| 37 | + |
| 38 | +`kubectl get pods -n weblogic-operator kubectl get pods` |
| 39 | + |
| 40 | +## Access the Kibana dashboard |
| 41 | + |
| 42 | +Get the `NodePort` from the Kibana services: |
| 43 | + |
| 44 | +`kubectl describe service kibana` |
| 45 | + |
| 46 | +Access the Kibana dashboard using the `NodePort` from the kubctl command output and the hostname, `http://hostname:NodePort` (for example, `http://slcac571:30211`). |
| 47 | + |
| 48 | +Select **Management** to configure an index pattern. You will see `logstash-*` prepopulated. |
| 49 | + |
| 50 | +Select the time filter, then click **Create**. |
| 51 | + |
| 52 | +To see the logs, select **Discover**. |
25 | 53 |
|
26 | 54 |
|
27 | 55 | 
|
0 commit comments