Splunk Search

Why is entry time not displaying?

Italy1358
Path Finder

When a user is added i need the time to be recorded and displayed in a field called used_added. I created the field name and can see if in the csv table but there is no time per entry.

<query>
| inputlookup USB.csv
| eval user_added = strftime(_time, "%Y-%d-%m %H:%M:%S")
| append [ | makeresults
| eval user="$user_tok$", description="$description_tok$", revisit="$revisit_tok$", Action="$dropdown_tok$" ]
| fields - _time
| table user_added, user_added, user, category, department, description, revisit, status
| lookup lookup_ims user as user OUTPUT category department
| outputlookup USB.csv
</query>
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

The user_added field is in a separate event from the other fields because of the append command.  What's more, I believe the _time field will be null since there is no event with such a field when user_added is defined.  Consider using now(), instead.

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

The user_added field is in a separate event from the other fields because of the append command.  What's more, I believe the _time field will be null since there is no event with such a field when user_added is defined.  Consider using now(), instead.

---
If this reply helps you, Karma would be appreciated.
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Build the Future of Agentic AI: Join the Splunk Agentic Ops Hackathon

AI is changing how teams investigate incidents, detect threats, automate workflows, and build intelligent ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...