Skip to content

re-worked this doc #221

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

Merged
merged 1 commit into from
Apr 29, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 52 additions & 24 deletions site/elk.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,55 @@
# ELK integration

**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.

TODO Update this whole section
Turn on Logstash in operator
Add the ENABLE_LOGSTASH env in weblogic-operator.yaml to the env section
name: ENABLE_LOGSTASH value: "true"
Create the PV and PVC for the operator logs
kubectl create -f elk-pv.yaml
Verify if PV and PVC are created kubectl get pv -n weblogic-operator kubectl get pvc -n weblogic-operator
Deploying the ELK stack
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.
Deploying Elasticsearch
kubectl create -f elasticsearch.yaml
Deploying Kibana
kubectl create -f kibana.yaml
Deploying Logstash
kubectl create -f logstash.yaml
Verify if ELK stack pods are created and running kubectl get pods -n weblogic-operator kubectl get pods
Accessing the Kibana dashboard
Get the NodePort from kibana services kubectl describe service kibana
Access Kibana dashboard using NodePort from output of the above kubctl command and the hostname http://hostname:NodePort (eg. http://slcac571:30211)
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
# Elastic Stack integration

**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.


## Turn on Logstash in the operator

In `weblogic-operator.yaml`, add `ENABLE_LOGSTASH` in the `env` section:

`name: ENABLE_LOGSTASH value: "true"`

## Create the PV and PVC for the operator logs

`kubectl create -f elk-pv.yaml`

Verify that the PV and PVC are created:

`kubectl get pv -n weblogic-operator kubectl get pvc -n weblogic-operator`

## Deploy the Elastic Stack

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.

### Deploy Elasticsearch

`kubectl create -f elasticsearch.yaml`

### Deploy Kibana

`kubectl create -f kibana.yaml`

### Deploy Logstash

`kubectl create -f logstash.yaml`

Verify that the Elastic Stack pods are created and running:

`kubectl get pods -n weblogic-operator kubectl get pods`

## Access the Kibana dashboard

Get the `NodePort` from the Kibana services:

`kubectl describe service kibana`

Access the Kibana dashboard using the `NodePort` from the kubctl command output and the hostname, `http://hostname:NodePort` (for example, `http://slcac571:30211`).

Select **Management** to configure an index pattern. You will see `logstash-*` prepopulated.

Select the time filter, then click **Create**.

To see the logs, select **Discover**.


![Kibana dashboard](images/kibana.png)