Bug 1277052

Summary: [intservice_public_91]no default index pattern provided on Kibana console
Product: OKD Reporter: wyue
Component: LoggingAssignee: ewolinet
Status: CLOSED CURRENTRELEASE QA Contact: chunchen <chunchen>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, jcantril, lmeyer, wsun, xtian
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-10 15:54:05 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:
Attachments:
Description Flags
kibana web console
none
kibana_console.part1.png
none
kibana_console.part2.png
none
kibana_console.part3.png
none
kibana_console.part4.png
none
default_index_for_kibana.png
none
set_default_index_screenshot.png none

Description wyue 2015-11-02 08:26:44 UTC
Description of problem:
A defautl index pattern should provided for users, but for now there is a warning message on Kibana console: 
Warning No default index pattern. You must select or create one to continue.

I tried 'logging.', but it doesn't work


Version-Release number of selected component (if applicable):
openshift v3.0.2.905
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2


How reproducible:
always

Steps to Reproduce:
1.deploy logging acorrding to :
https://github.com/openshift/origin-aggregated-logging/tree/master/deployment

1.1 oc new-project logging
1.2 oc secrets new logging-deployer nothing=/dev/null
1.3 oc create -f - <<API
apiVersion: v1
kind: ServiceAccount
metadata:
  name: logging-deployer
secrets:
- name: logging-deployer
API
1.4
oc policy add-role-to-user edit system:serviceaccount:logging:logging-deployer
1.5
oc process -f deployer.yaml.1 -v IMAGE_PREFIX=rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/,KIBANA_HOSTNAME=kibana.example.com,PUBLIC_MASTER_URL=https://xxxx:8443,ES_INSTANCE_RAM=1024M,ES_CLUSTER_SIZE=1 | oc create -f -
1.6 oc process logging-support-template | oc create -f -
1.7 oc edit scc/privileged
1.8 openshift admin policy add-cluster-role-to-user cluster-reader system:serviceaccount:logging:aggregated-logging-fluentd

2.update dc 'oc edit dc logging-kibana' to make sure value of OAP_MASTER_URL is same with OAP_PUBLIC_MASTER_URL(can't login without updating this)
3.wait for kibana pod ready, then access kibana with: https://kibana.example.com

Actual results:
a warning message on web console(please see the attached picture)


Expected results:
a default index should be provided

Additional info:
[root@dhcp-128-16 var]# oc get is
NAME                    DOCKER REPO                                                                       TAGS                                                                                                                  UPDATED
logging-auth-proxy      rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-auth-proxy      3.1-1,3.1,3.1-5 + 9 more...                                                                                           About an hour ago
logging-elasticsearch   rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-elasticsearch   3.1,rhose-3.1-rhel-7-docker-candidate-20151019160642,latest + 17 more...                                              About an hour ago
logging-fluentd         rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-fluentd         3.1-2,rhose-3.1-rhel-7-docker-candidate-20151016172759,rhose-3.1-rhel-7-docker-candidate-20151017171559 + 7 more...   About an hour ago
logging-kibana          rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-kibana          rhose-3.1-rhel-7-docker-candidate-20151015084248,rhose-3.1-rhel-7-docker-candidate-20151019234347,3.1 + 3 more...     About an hour ago




[root@openshift-149 ~]# docker images | grep logging
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-elasticsearch                 latest              9103b3bc7a3a        2 days ago          394.4 MB
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-deployment                    latest              164d1bf9ea04        2 days ago          502.7 MB
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-kibana                        latest              975b1e1caa26        13 days ago         219.3 MB
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-auth-proxy                    latest              36459ade9524        2 weeks ago         184.1 MB

Comment 1 wyue 2015-11-02 08:30:31 UTC
Created attachment 1088487 [details]
kibana web console

Comment 2 Luke Meyer 2015-11-02 12:59:50 UTC
Index patterns are actually created automatically (or, should be, if the user has access to any projects; otherwise no index patterns can be defined at all). However none is designated as the default and so Kibana still sends you to the settings page to designate a default. It would be nice if a default were chosen for you.

I've been working on docs but not merged them yet.
https://github.com/sosiouxme/origin-aggregated-logging/blob/20151028-docs/deployment/README.md#using-kibana

In the attachment I don't see that you have any index patterns defined. They would be on the left, one per project. That either means your user doesn't have access to any projects, or you're not using the latest ES image from OSBS (it has changed since testing began, and was in fact rebuilt Friday I think). Or there is some other bug we're not aware of, which is possible; I don't recall seeing an actual error with stack trace on this before.

Comment 3 Jeff Cantrill 2015-11-04 13:56:36 UTC
Fixed by: https://trello.com/c/139YEyib  Needs a new image to incorporate the RPM that includes the fix.

Comment 4 ewolinet 2015-11-04 22:14:40 UTC
New image has been built and released in the latest puddle; please retest using this latest image.  It should create a default index in the case where a user is not already assigned to a project.

Comment 5 chunchen 2015-11-05 06:25:54 UTC
Met some "Fatal Error" on kibana web console page,please refer to the attachment named "kibana_console.part*.png"

Below are the tested logging images:
[root@openshift-127 ~]# docker images|grep log |grep rcm
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-kibana                         latest              68dc8930f512        8 hours ago         219.1 MB
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-elasticsearch                  latest              a19de4483a73        15 hours ago        394.4 MB
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-deployment                     latest              164d1bf9ea04        5 days ago          502.7 MB
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-fluentd                        latest              f0e0df45e299        2 weeks ago         190.8 MB
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-auth-proxy                     latest              36459ade9524        2 weeks ago         184.1 MB

Comment 6 chunchen 2015-11-05 06:27:20 UTC
Created attachment 1089948 [details]
kibana_console.part1.png

Comment 7 chunchen 2015-11-05 06:28:05 UTC
Created attachment 1089949 [details]
kibana_console.part2.png

Comment 8 chunchen 2015-11-05 06:28:32 UTC
Created attachment 1089950 [details]
kibana_console.part3.png

Comment 9 chunchen 2015-11-05 06:29:00 UTC
Created attachment 1089951 [details]
kibana_console.part4.png

Comment 10 Jeff Cantrill 2015-11-05 14:52:56 UTC
Rebuilding the logging-kibana image to resolve the issue demonstrated in the attachement.

Comment 12 chunchen 2015-11-06 07:23:48 UTC
Checked the latest images, it can get the default index for kibana for now, please refer to the attachment "default_index_for_kibana.png"

[root@openshift-135 ~]# docker images|grep rcm |grep logg
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-elasticsearch                  latest              7707f0d3f875        10 hours ago        394.4 MB
rcm-img-docker01.build.eng.bos.redhat.com:5001/openshift3/logging-kibana                         latest              305d78ea6219        16 hours ago        219.1 MB

Comment 13 chunchen 2015-11-06 07:27:16 UTC
Created attachment 1090484 [details]
default_index_for_kibana.png

Comment 14 ewolinet 2015-11-06 21:33:03 UTC
It should have set the default for you in addition to creating an index, rebuilding the image to resolve that.

Comment 15 chunchen 2015-11-10 05:34:37 UTC
Checked the latest images, it has set the default index for now, pleas refer to the attachment named "set_default_index_screenshot.png".

Below is the tested kibana image:
REPOSITORY                 TAG      IMAGE ID      CREATED        VIRTUAL SIZE
openshift3/logging-kibana  latest   1cf3ad1d6d74  13 hours ago   219.1 MB

Comment 16 chunchen 2015-11-10 05:36:46 UTC
Created attachment 1092057 [details]
set_default_index_screenshot.png