Splunk Search

Splitting up Transaction

Jesterhead
Engager

Hey all,

I'm trying to set up a transaction to track uptime vs downtime for our locations. In one field I have either true or false for each hour. I'm looking to get total time for each 'group' of events. . I would like to be able to have each 'group' (could last from several hours, to a week or more) of false readings to be it's own transaction. Over the course of a month or more, we could have many groups of false for each site, so I'd like to be able to see how long each incident kept it down for and how often it goes down over time.

Is this possible to do with transaction? Or would I be better off using a different command for this type of thing?

Here's what I'm using right now (prereg would mean that location is down):

*| eval hourly_status=if(prereg_on>prereg_off, "true","false") | transaction fields=hourly_status | eval human_duration=(duration)/86400

Tags (1)
0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

My first guess would be the slightly off use of transaction.

*|eval hourly_status=if(prereg_on>prereg_off,"true","false")|transaction hourly_status|eval human_duration= duration/86400

I'll run this down some more in my head and see what I come up with.

0 Karma

Jesterhead
Engager

I think my problem might lie in the fact that I'm using transaction on just a field and not the _raw. It's the same event that logs True or False (just has a true or false in the message), so I'll try to build a transaction that pulls the status right out of the _raw.

Many thanks!

0 Karma
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!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas

Why Splunk Customers Should Attend Cisco Live 2026 Las Vegas     Cisco Live 2026 is almost here, and this ...

Data Management Digest – May 2026

Welcome to the May 2026 edition of Data Management Digest!   As your trusted partner in data innovation, the ...