Reporting

Compare this month to last month results

hartfoml
Motivator

I can find the number of clients talking to my deployment server by client group name like this.

index=_internal hostname=* component="Metrics" group="ds_connections_default" | stats dc(hostname) by name | addcoltotals labelfield=name label=TOTAL

this might not be the fastest or most efficient method and if you know a better way please let me know.

I want to run this search for the last month and compare to the month before that so that I get a number of clients per client group name with "coltotal" added last month report.

Does that make sense???

any help would be appreciated.

Tags (2)
0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Remember that by default your _internal index will only keep data for 30 days, so without storing summary data in another index you'd need to increase that to cover two months.

somesoni2
Revered Legend

Try this

index=_internal hostname=* component="Metrics" group="ds_connections_default" earliest=-2mon@mon latest=@mon| chart dc(hostname) by name,date_month | addcoltotals labelfield=name label=TOTAL
0 Karma

linu1988
Champion

that is why it needs to be in summary index where you store the result for each month rather running one 5 min query for the result from _internal logs. then you can mention month wise report.

0 Karma

hartfoml
Motivator

Thanks Timewrap is almost the answer I was looking for a difference (i.e 39 new clients were added last month)

Like this - Number of clients last months subtract number of clients two months ago equals number of clients added

Mar Clients 120
Feb Clients -110
New Clients 20
20 clients added last month

Seems simple enough I just cant figure out how to do it in one search or report query?

Thanks everyone for your help

0 Karma

MuS
Legend

go for timewrap this will do exactly what you need

0 Karma

hartfoml
Motivator

Thanks I see the different Columns using the chart command.

then I can subtract one column from the other.

I am looking at the small app called "Timewrap" this might work for me

http://apps.splunk.com/app/1645/

somesoni2
Revered Legend

If I am not wrong with this search, you'll get 3 columns, name, month1, month2 which mean you can compare the data for last month with a month before that. Trick is to specify proper time period using earliest and latest. [to compare current month and last month, use earliest=-1mon@mon latest=now]

0 Karma

hartfoml
Motivator

Thanks this is helping to get the previous two months of data. I still need to separate the two months and compare the results to see the change between months. the last month compered to this month type thing to get the difference. I guess it wasn't too clear. sorry...

Thanks again for the help 🙂

0 Karma

hartfoml
Motivator

thanks much I'll try to lookup how to do that

0 Karma

linu1988
Champion

summarize then run the comparison.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...