TransWikia.com

Getting timestamp in micro seconds in GKE cluster

Server Fault Asked by Nagendra Kumar on December 16, 2021

As you can see the LastTrigger is in seconds:

VirtualBox:~# kubectl get ep  -o custom-columns=Creation:.metadata.creationTimestamp,Labels:.metadata.labels,name:.metadata.name,Endpoints:.subsets[*].addresses[*].ip,"LastTrigger:.metadata.annotations.endpoints.kubernetes.io/last-change-trigger-time" --watch
Creation               Labels                           name                    Endpoints                           LastTrigger
2020-02-17T08:51:44Z   <none>                           kubernetes              35.185.33.116                       <none>
2020-04-16T14:36:44Z   map[run:meghha-dashboard]        meghha-dashboard        <none>                              <none>
2020-04-28T16:43:03Z   map[run:meghha-dashboard-main]   meghha-dashboard-main   10.32.1.26                          <none>
2020-07-08T13:50:05Z   map[name:mongo]                  mongodb-service         <none>                              2020-07-08T13:50:05Z
2020-07-18T14:00:12Z   map[run:my-nginx]                my-nginx                10.32.2.88,10.32.2.91,10.32.3.178   2020-07-23T13:36:06Z
2020-07-19T13:28:13Z   map[run:my-nginx]                my-nginx1               10.32.2.88,10.32.2.91,10.32.3.178   2020-07-23T13:36:06Z
2020-07-19T13:28:13Z   map[run:my-nginx]                my-nginx1               10.32.2.88,10.32.3.178              2020-07-23T14:57:46Z
2020-07-18T14:00:12Z   map[run:my-nginx]                my-nginx                10.32.2.88,10.32.3.178              2020-07-23T14:57:46Z
2020-07-18T14:00:12Z   map[run:my-nginx]                my-nginx                10.32.2.88,10.32.2.91,10.32.3.178   2020-07-23T14:57:47Z
2020-07-19T13:28:13Z   map[run:my-nginx]                my-nginx1               10.32.2.88,10.32.2.91,10.32.3.178   2020-07-23T14:57:47Z

I want the timestamp in microseconds, it is for GKE cluster. Is there any configuration in GKE cluster to get the time stamp in microseconds?

One Answer

Unfortunately there is no a native way to change.

I tottally understand you concern about quickly take decision, in this way you can use other alternatives to monitoring your environment.

You can process the logs using an external tool like prometheus, or use some circuit breake to keep your application resilience. If you are using the output of that command to take some action, keep in mind that sometime it could take more time than expected, since there are other variables in the middle of the way, such as network delays, the node workloads etc.

As I don't know you environment and what kind of decision you need to take I can only suggest alternatives like that.

Answered by Mr.KoopaKiller on December 16, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP