I have a database table full of logs, and I would like to upload that into Splunk by executing a query to get an array of logs, then iterating over it and running console.log() on each log. This almost works fine, however the timestamp that Splunk picks up for each log is based on whatever time I run the upload script.
Is there any way I can transform my log object so that Splunk will use the timestamps I provide? For example, one of my logs might look like:
{
id: 2910432221,
log_timestamp: 2019-08-07T19:04:03.000Z,
userId: 2331,
actionId: 45
}
Ideally, I would be able to run something like this, and have the value of splunk_timestamp appear in the Time column in the Splunk dashboard.
console.log({
id: 2910432221,
splunk_timestamp: 2019-08-07T19:04:03.000Z,
userId: 2331,
actionId: 45
})
Is anything like that possible?