I am a new splunk user and I want to create a stats table showing different findings of an event using fields. However, I am running into error when I use the earliest command twice. Here's what I have so far:
index= xxx source=xxx sourcetype=xxx
| stats latest(name) as name, latest(call_time) as call_time
| eval call_time=strftime(...)
| table name, call_time
| join name
[ search index=xxx source=xxx sourcetype=xxx conversation="\*hello\*"
| stats earliest(_time) as first_hello by name
| eval first_hello=srtftime(...) ]
| join name
[ search index=xxx source=xxx sourcetype=xxx messages="\*how\*"
| stats earliest(_time) as first_how by name
| eval first_how=srtftime(...) ]
| table name, call_time, first_hello, first_how
My errors are the following:
1. Both first_hello and first_how, are displaying the same time.
2. As I added the 'join' I could tell that the number of statistics decreased. I want to find a way that it displays all the events and that if a certain time (or word) cannot be found then it will just stay blank. I don't know if this is possible. I can see how that contradicts the purpose of 'join' but I couldn't find another way to do it.
Clarifications:
1. When it comes to messages and conversations, I want to find the first time that each field had a value containing the specific word(hello and how correspondingly). These two fields contain values that look like paragraphs. In other words, I want to find the first time that xxname said hello in conversation and how in messages.
Goal:
Display a table that shows: name,TIME of the last call (corresponding to that name), TIME of the first time the word hello was said in the values of the conversation field, TIME of the first time the word how was said in the values of the messages field.
Let me know if I need to clarify anything else.
... View more