Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading Levenshtein Command
SHA256 checksum (levenshtein-command_06.tgz) 9eb396d3575dafbe2cb8c33fcdb402272da09570f1e943c134ffae380cec4fab SHA256 checksum (levenshtein-command_05.tgz) 3f9d6ee7b44cbb8e7765d33e852726374c75732643ce96e543ba0145a5908def
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

Levenshtein Command

Overview
Details
This add-on uses the github distribution of the Levenshtein command to find
the raio or distance between two strings. READ the README.txt for installation.

Usage:

|levenshtein (distance|ratio) field1 field2 | table field1 field2 ratio

Examples:

sourcetype=apache | levenshtein ratio client_domain src_domain | table client_domain src_domain ratio

sourcetype=apache | levenshtein distance client_domain src_domain | table client_domain src_domain distance

sourcetype=apache | levenshtein all client_domain src_domain | table client_domain src_domain ratio distance

Please note that I tested this using Python 2.7 on a MacOS. The script calls the Levenshtein "egg" module that installs OUTSIDE of Splunk Python. It appears that the github download for Levenshtein in Python is 32 bit, which may not work as is on a 64 bit Linux machine running Splunk 64 bit.

In simple terms, distance is the number of characters that differ and ratio is the percentage of characters that differ. So, rocks and docks will have a distance of 1 and ratio of .8.

From Splunker Burch Simon:

"Ever wonder if it’s possible to search things that aren’t an exact match? What if you’re looking for “Google” in your data but still want to find matches for “Gogle” and “Googlle”? Well, you’re in luck because that’s exactly what the Levenshtein command does! Extend your SplunkFu by finding and filtering results based on how close of a match they are. Say goodbye to your binary world of equals and not equals. Say hello to Levenshtein!"

Release Notes

Version 0.6
Nov. 11, 2014

Added all option to get ratio and distance fields at the same time.

Version 0.5
Nov. 5, 2014

38
Installs
376
Downloads
Share Subscribe LOGIN TO DOWNLOAD

Subscribe Share

AppInspect Tooling

Splunk AppInspect evaluates Splunk apps against a set of Splunk-defined criteria to assess the validity and security of an app package and components.

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 50GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps and add-ons from Splunk, our partners and our community. Find an app or add-on for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
© 2005-2018 Splunk Inc. All rights reserved.
Splunk®, Splunk>®, Listen to Your Data®, The Engine for Machine Data®, Hunk®, Splunk Cloud™, Splunk Light™, SPL™ and Splunk MINT™ are trademarks and registered trademarks of Splunk Inc. in the United States and other countries. All other brand names, product names, or trademarks belong to their respective owners.