Splunk Search

I have an event contains join_date, id as fields , want to count of "id " by month ,

nagarjuna280
Communicator

I have an event contains join_date, id as fields , want to count of "id " by month ,

the event index time and start_date are different. all events are indexed at a time

I tried

|eval _time=strftime(strptime(join_date,"%d-%b-%y %H:%M:%S"), "%Y-%m-%d %H:%M:%S") |timechart span=1d count(id)

not showing results

Tags (1)
0 Karma
1 Solution

kmorris_splunk
Splunk Employee
Splunk Employee

You could try something like this:

YOUR BASE SEARCH
| eval joinmonth=strftime(strptime(join_date,"%m/%d/%Y"),"%B") 
| stats count(id) by joinmonth

View solution in original post

kmorris_splunk
Splunk Employee
Splunk Employee

You could try something like this:

YOUR BASE SEARCH
| eval joinmonth=strftime(strptime(join_date,"%m/%d/%Y"),"%B") 
| stats count(id) by joinmonth

adonio
Ultra Champion

hello nagarjuna280,
can you elaborate a little, or attach a sample data?
it is not clear as you mention the event contains join_date and in the second sentence you mention start_date
in any case, if you want the count of id by month, use span of 1mon
also, maybe you can extract the time while on boarding the data

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...