Is it possible to find date related data for updated key-values? #16254
-
Hello, everyone. I would love to know if etcd stores information related to when a key was updated with a new value. Is there any etcdctl command that can be used to find such information? I came across the following command for finding the date related information for an updated key-value pair:
However, the output of running the above command for the "name" key was incorrect and as follows:
Clearly, the above method does not work but it does help understand the kind of output I am expecting: date & time of when a key was updated with a value. Please let me know how it will be possible to get such data. Any help would be highly appreciated so thank you in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @yash-anand-fosteringlinux - Short answer is that etcd stores revisions as integers, not timestamps on the creation of a key, so this is not really possible from a time perspective. If you are using etcd in the context of kubernetes consider exploring kubernetes api server audit logs for timestamp based information. |
Beta Was this translation helpful? Give feedback.
Hey @yash-anand-fosteringlinux - Short answer is that etcd stores revisions as integers, not timestamps on the creation of a key, so this is not really possible from a time perspective.
Also refer https://stackoverflow.com/questions/76692414/is-it-possible-to-retrieve-creation-date-time-of-a-key-value-pair-in-etcd
If you are using etcd in the context of kubernetes consider exploring kubernetes api server audit logs for timestamp based information.