Sending '@timestamp' and '_id' to Fluentd Endpoint

I have written a sample python script to send message at Kibana Dashboard of EFK stack. I am sending message from python script to Fluentd Endpoint.

The script is the following:

import requests
import json
from datetime import datetime

username = "abc"
password = "xyz"

url = ""

r =, auth=(username, password), json={"msg":"random testing"})


At Kibana Dashboard of EFK stack, I got the following.

Sep 1, 2021 @ 21:32:48.258  msg:random testing @timestamp:Sep 1, 2021 @ 21:32:48.258 _id:4rVKrHsBWfzSb5RDi6m7 _type:_doc 
                            _index:logs-json-2021.09.01 _score: -

Is there any way to send ‘@timestamp’ and ‘_id’ from python script to Fluentd Endpoit ?

If we send at Elasticsearch Endpoint from Python script using elasticsearch API, we can set ‘@timestamp’ and ‘_id’ at the Python script. I am trying to find out if there is any way for Fluentd Endpoint.