Spread our blog

Usage Of Splunk Eval Function: MVRANGE

“mvrange” is a eval function. We can use mvrange function to create a multivalue field for a range of numbers. This is very useful function for multivalue creation. 

Syntax:

| eval <field_name>=mvrange(X,Y,Z)

Here X is the starting number, Y is the ending number, Z is the number gap.

Example:

index=_internal
| head 1
| eval showrange=mvrange(1,10,3)
| table showrange

Explanation:

Here we want to show number between 1 and 10 with gap 3 so values will be 1,4,7.
In mvrange function first we have mentioned our starting number then our ending number after that we have given the number gap of range.

mv_range_gap

Now you can effectively utilize “mvrange” function with “eval” command to meet your requirement !!

Hope you are now comfortable in : Usage of Splunk EVAL Function : MVRANGE

Happy Splunking 🙂

What’s your Reaction?
+1
+1
+1
+1
+1
+1
+1

Spread our blog
You can also know about :  Usage of Splunk EVAL Function : MVJOIN

LEAVE A REPLY

Please enter your comment!
Please enter your name here