Created attachment 1182405 [details]
logs for test described in "description"
Description of problem:
When we click on the "archive" link in the "logs" section of the OpenShift Console we are correctly redirected to Kibana. However we have the issue that not the correct index is selected. Kibana complains that the specified pattern cannot be found and hence falls back to the default.
For these tests/logs I used the following:
- project/namespace: tst-es
- pod: cakephp-example-1-zxh7o
The URL that is generated when clicking on the "archive" link:
This translates into the following query string in Kibana:
kubernetes_pod_name: cakephp-example-1-zxh7o && kubernetes_namespace_name: tst-es (with the incorrect index selected: dev-halleluja.1a9362e4-2d79-11e6-8591-001a4a010184.*)
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Below is the requested HTML code:
<input type="hidden" name="redirect" value="/#/discover?_g=(time:(from:now-1w,mode:relative,to:now))&_a=(columns:!(kubernetes_container_name,cakephp-example),index:'tst-es.*',query:(query_string:(analyze_wildcard:!t,query:'kubernetes_pod_name: cakephp-example-1-zxh7o %26%26 kubernetes_namespace_name: tst-es')),sort:!(time,desc))#console_container_name=cakephp-example&console_back_url=https%253A%252F%252Fos-cluster.server.lan%253A8443%252Fconsole%252Fproject%252Ftst-es%252Fbrowse%252Fpods%252Fcakephp-example-1-zxh7o">
The above code seems to be correct. What happens is that you are redirected to the above link, but as the index is not found you ge redirected to the default.
@lmeyer should we not be including the index in the link? Is there anything the console team can actually do about this or should it get assigned back to Logging?
@jforrest My question was a red herring. I believe what happened is that the index format changed and nobody told you. The index pattern was <project-name>.* and is now (since some 3.2 security update) supposed to be <project-name>.<project-uuid>.* - I don't have an install handy to check but I believe that's what Kibana/ES are pre-creating and expecting to see. Going to tag Eric on this as he would know for sure.
working with @ewolinetz to get this updated.
PR opened: https://github.com/openshift/origin-web-console/pull/274
Commit pushed to master at https://github.com/openshift/origin-web-console
Fix bug 1358674: "archive" link does not automatically select correct index/pattern
backport to 3.2: https://github.com/openshift/ose/pull/327
Will test when PR https://github.com/openshift/ose/pull/327 is merged
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.