Newbie, I am making a python program, or script, to process logs. After processing and inserting it into elastic search, how to set a dynamic variable that can change with the system time. For example, the variable is num0508 today and will become num0509 tomorrow?
I guess you want to insert logs or data into an index named after date. If so, you can just use a string
If you explain your scenario more clearly, I believe we will provide a method that better meets your needs
Follow the code in the picture below to implement it