Alerting

count condition

ytl
Path Finder

so i have logs where a log entry is generated when things are bad; and another when it's good. i can typically use 'transaction' to group these together; however, i only care to get information when i get one entry (bad) but not the related other (good).

so i have each event tagged with 'up' or 'down', so i was thinking of doing something where if the last entry is 'down', then i want some output - like in a table by the host.

any idea how this could be implemented?

Tags (2)
0 Karma

netwrkr
Communicator

This isn't too hard. Using the transaction command along with 'startswith' and 'endswith' you want to search on transactions that aren't closed and then output those unclosed (or evicted) transactions "|search closed_txn=0"

keepevicted= Description: Whether to output evicted transactions. Evicted transactions are events that do NOT match the transaction parameters; for example, the time range is wrong, or the "startswith" or "endswith" requirements are missing. Evicted transactions can be distinguished from non-evicted transactions by checking the value of the 'closed_txn' field, which is set to '0' for evicted transactions and '1' for closed ones. A transaction is evicted from memory when the memory limitations are reached.

HTH

0 Karma
Get Updates on the Splunk Community!

Upcoming Webinar: Unmasking Insider Threats with Slunk Enterprise Security’s UEBA

Join us on Wed, Dec 10. at 10AM PST / 1PM EST for a live webinar and demo with Splunk experts! Discover how ...

.conf25 technical session recap of Observability for Gen AI: Monitoring LLM ...

If you’re unfamiliar, .conf is Splunk’s premier event where the Splunk community, customers, partners, and ...

A Season of Skills: New Splunk Courses to Light Up Your Learning Journey

There’s something special about this time of year—maybe it’s the glow of the holidays, maybe it’s the ...