Splunk Search

Locate Changes to Field and Count Them

enb_splunk
Engager

Hello Splunk Community,

I need to find out how many upgrades were performed to systems and unsure how to best proceed. The data is similar to what is listed below:

_timehostnamesystemmodelversion
2025-01-01axx15.2(8)
2025-01-01byy15.3(5)
2025-01-02axx15.3(5)

 

There are thousands of systems with various versions. I am trying to find a way to capture devices that have gone from one version to a newer one indicating an upgrade took place. Multiple upgrades could have occurred over time for a single device and those need to be accounted for as well. Any help suggesting where to start looking into what to use would be greatly appreciated.

Thanks.

-E

Labels (2)
0 Karma

bowesmana
SplunkTrust
SplunkTrust

Like the others, not totally sure what you're after, but given your example data, this SPL

| stats latest(version) as last_version max(_time) as last_time count(version) as count_version dc(version) as dc_version by hostname model system

will tell you the count of version records, the last version/date, the distinct version count for each host/system/model

However, if you want to detect "NEWER" vs going backwards in versions, you'll need to define that rule in the version data.

Also, this will only tell you within the search range, how far back do you want to go?

 

0 Karma

ITWhisperer
SplunkTrust
SplunkTrust

It is not clear what you are expecting your result to be. You mention devices but these are not mentioned in your data. Since each event appears to represent a different version, can you not just count the events? Please clarify what you are trying to do, what more of your data looks like and what your expected results would be.

0 Karma

isoutamo
SplunkTrust
SplunkTrust
Probably the best way to do this is create a lookup file/kvstore collection where you are stored current/earlier versions. Then just create a SPL query which creates current status, then checks what are differences between those two.

If you need exact SPL then please share what you have currently with some sample data with masked identifiers.
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...