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.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...

Customer success is front and center at .conf25

Hi Splunkers, If you are not able to be at .conf25 in person, you can still learn about all the latest news ...