user1693207
user1693207

Reputation: 129

Application logs & and log time in Openshift V3 (pro) projects

I just deployed my Java + Mysql applications to Openshift V3 platform on I noticed a few things in the logfiles:

  1. The timestamps are not EST even though the server for my account is us-east-x. I saw 4 hours difference, but today is 3 hours ahead EST. So my question: how do I set the time for my POD to be my local time? Otherwise, the log (with unknown timestamps) will be little use.

  2. On V3, do I have ways of accessing logfiles other than viewLog for PODs on the Openshift web console? I found the viewLog on console is not a practical tool: a) it gives only 5000 lines of log, and (b) it lacks basic search/find functionality.

Upvotes: 0

Views: 1328

Answers (1)

luciddreamz
luciddreamz

Reputation: 2093

  1. All of my log output in the web console is in UTC (using OpenShift provided container images), but timezone might be set by the container image you're using to something other than UTC. You can set the timezone for your pod using a TZ environment variable (oc env [dc] TZ=Europe/Vienna).
  2. Kibana is installed on all of the OpenShift clusters. Every place where OpenShift shows logs for pods you should see a link to "View Archive" in the upper right corner above the log output (the view archive link only shows above pod logs - not for deployments/builds). If you can't find it, just navigate directly to the logs subdomain (https://logs..openshift.com/).

Upvotes: 1

Related Questions