[2020-11-27T03:53:09.046Z] "HEAD /productpage HTTP/1.1" 200 - "-" 0 0 27 27 "10.244.11.0" "curl/7.47.0" "ef48c206-422a-9d0d-ac56-9be531b190f7" "10.22.24.5:31695" "10.244.6.18:9080" outbound|9080||productpage.istio-web.svc.cluster.local 10.244.6.251:41376 10.244.6.251:8080 10.244.11.0:54697 - -
How to change istio log time zone to 'Asia/Shanghai'?
This topic has already been discussed on envoy github as istio uses envoy access log.
As far as I know currently it's not possible. There are github issues I mentioned above about that which says that it's designed in UTC by default.
Access log's timestamps are still in UTC regardless a containter's timezone
How to change the log time zone of each component of Istio to CST format
It's not even possible to persuade the image to use your timezone as envoy will use the UTC anyway.
Related
After following the procedure noted in this answer to change server time zone for a dyno the timestamp was still showing UTC using the command heroku log --tail or viewing logs on the application dashboard.
For example a Heroku contributor was trying to set IST via TZ="Asia/Kolkata, and I have done the same using TZ=America/New_York. However the timestamp in the log remains UTC regardless of the time zone chosen in the TZ environment variable.
As documented here, the TZ environment variable will not affect logs. Heroku logs are always timestamped in UTC.
What does this mean? It's just a warning on my Heroku metrics dashboard and isn't seemingly affecting me in a negative way, but I'm worried it's secretly messing with something?
The Heroku Status Twitter account has 3 tweets starting yesterday regarding this incident. The incident began 2 days ago (January 10th as of this writing) as the bottom of the page says:
Issue
From 18:48 UTC (1:48 PM ET) we have been experiencing losses in log drains.
Application log drains (add-ons and custom drains to external services) may have missing log lines.
During this incident, heroku logs --tail can be used to monitor incoming logs and should not have missing log lines. This output can be redirected to a file for later use if desired: heroku logs --tail > /tmp/.log
POSTED 2 DAYS AGO, JAN 10, 2018 20:22 UTC
It might affect you in a negative way if you rely on application logs for further analysis and record keeping.
I have an issue on a Heroku server. Saving a unix timestamp to my DB using moment.js on my local server functions correctly. However on Heroku the timestamp is 23 hours behind, rounded down to the nearest hour.
dateProvided = Number(moment($('#dateProvided').val(), 'DD/MM/YYYY').unix())
The value provided by $('#dateProvided').val() is "12/08/2017". The unix timestamp for both the local and Heroku server is "1502492400" which is "08/11/2017 # 11:00pm (UTC)" when converting.
Return value
When I want the value that has been saved the code is:
moment.unix(dateProvided).format('DD/MM/YYYY')
Browser
The code above returns the correct date "12/08/2017" on the browser.
Heroku server
The code above returns the incorrect date "11/08/2017" on the Heroku server.
The issue was my local timezone was being used as the unix timestamp and Heroku is on UTC timezone. Therefore when saving Heroku was differing. The solution is:
moment.utc(value, 'DD/MM/YYYY').unix()
This ensures the timezone is the same as Heroku when saving a timestamp.
Use the module moment-timezone as this handles all types of timezones around the world. It fixed my problem with Heroku date/times.
Example:
const date = moment().tz('Europe/London').format('DD/MM/YYYY');
Further info: https://momentjs.com/timezone/
I'm running Grafana 4.1.0_beta1 and Elasticsearch 5.1.1.
All my servers are setup for Mountain Time, I seem to be running into an issue where Grafana attempts to "account" for UTC, and offsets search parameters by 7 hours.
As an example;
date result from server; Wed Jan 4 20:10:54 MST 2017
But when I try to add and test a data source in Grafana, I get this error:
{"root_cause":[{"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"metricbeat-2017.01.05","index_uuid":"_na_","index":"metricbeat-2017.01.05"}],"type":"index_not_found_exception","reason":"no such index","resource.type":"index_or_alias","resource.id":"metricbeat-2017.01.05","index_uuid":"_na_","index":"metricbeat-2017.01.05"}
While metricbeat-2017.01.05 does not exist, metricbeat-2017.01.04 does as it should.
When on a dashboard, I don't see any data, until I set the time, to anything over 7h prior.
I didn't see anything regarding timezone in the elasticsearch, or grafana config files.
Am I missing something?
Classic case of over analyzing.
It looked like everything was correct because it was, except for my client timezone.
Correct Timezone on local client
Ensure time is updated correctly
Restart web browser
You should be able to time shift the data back into range by 7h by going into added panel widget -> Time range -> Add time shift.
--If nothing else works that is.
I'm trying to use curl to write datapoints into to influxdb and then display with grafana.
The following successfully writes to influxdb, but the time is in UTC
# curl -i -XPOST "http://localhost:8086/write?db=db_fio" --data-binary "test result=22"
HTTP/1.1 204 No Content
Request-Id: a333902d-7c69-11e5-802d-000000000000
X-Influxdb-Version: 0.9.4.1
Date: Tue, 27 Oct 2015 05:14:45 GMT
# date
Mon Oct 26 22:17:40 PDT 2015
When I try to display the datapoints in grafana I can not as they are in the future for my timezone (PDT), even thought both services are running on the same server.
What am I doing wrong? How do I get grafana and influxdb to be on the same time?
You can set UTC timezone per dashboard.
http://play.grafana.org/dashboard/db/new-features-in-v20?editview=settings
InfluxDB only supports UTC. There is no way to write or query points in any other timezone. The feature request for timezone support describes some of the challenges that make this a difficult feature to implement.
I am not familiar enough with Grafana to know if it can do timezone translation on the results from InfluxDB.