Unique ID

How to create a unique id for all events using logstash? This is something like incremental unique ID used in a normal database.

Probably https://www.elastic.co/guide/en/logstash/current/plugins-filters-fingerprint.html

Is there a way to create a field with a timestamp that has six decimal place. I am worry that the lesser decimal place may result in duplicate IDs.

Probably Fingerprint filter plugin | Logstash Reference [8.11] | Elastic

No, prefer the uuid filter. The fingerprint is supposed to create something that's not random.