- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
shinde0509
Explorer
11-24-2020
12:04 AM
Want to count all events from specific indexes say abc, pqr and xyz only for span of 1h using tstats
and present it in timechart.
Tried this but now working
| tstats count WHERE earliest=-1d@-3h latest=now index=ABC,PQR,XYZ by index, _time span=1h | timechart sum(count) as count by index.
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

thambisetty

SplunkTrust
11-24-2020
01:50 AM
| tstats count where index IN (windows,nix) by _time, span=1h , index
| chart values(count) as count over _time by index
————————————
If this helps, give a like below.
If this helps, give a like below.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
isoutamo

SplunkTrust
11-24-2020
02:52 AM
Hi
You can try this:
| tstats count WHERE earliest=-1d@-3h latest=now index IN (ABC,PQR,XYZ) by index _time span=1h prestats=t
| timechart span=1h count as count by index.
You must use count on both and also span must be the same.
r. Ismo
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
shinde0509
Explorer
11-24-2020
08:07 AM
NO, Getting graph only for first index.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
isoutamo

SplunkTrust
11-24-2020
08:20 AM
Sorry, I just copied that from your example. It must be index IN (ABC, PQR,XYZ) or in the old way index = ABC OR index = PQR OR index = XYZ. Fixed into my previous reply.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

thambisetty

SplunkTrust
11-24-2020
01:50 AM
| tstats count where index IN (windows,nix) by _time, span=1h , index
| chart values(count) as count over _time by index
————————————
If this helps, give a like below.
If this helps, give a like below.
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
shinde0509
Explorer
11-24-2020
08:08 AM
Thanks, Working.
