Refine your search:

i have numerous eventtypes defined and in many cases a logging event may have several eventtypes associated with it.

i would like to be able to plot the eventtypes such that i do not get duplicates in the chart/pie chart. for example, i may have a log entry with eventtype=cisco_syslog_types and eventtype=network_port (ie it's a multivariable field)

i understand that there is a 'mvfind()' command where i could potentially do something like

search X | eval mvfind( eventtype, "network_*" )

but it returns that the 'mvfind' function is unsupported. i'm using splunk 4.2.1.

i've also tried using the mvindex() command with success, however, as the order of the eventtype mv is never the same, its usefulness is somewhat limited.

asked 31 May '11, 16:36

ytl's gravatar image

ytl
398
accept rate: 0%


2 Answers:

I'm not sure what the deal is with mvfind, but would this work?:

search X | eval a=mvfilter(eventtype LIKE "network_%") | search a=* | timechart count by a
link

answered 31 May '11, 18:53

mw's gravatar image

mw
1.7k215
accept rate: 29%

cool; that worked! :) is there a way to do a 'NOT' in the like? specifically, i have single events with both eventtypes network_acl and network_acl.deny and i only care to count the ones without the '.' in the eventtype. cheers!

(03 Jun '11, 13:41) ytl

Strangely, I don't think you can literally do: mvfilter(eventtype NOT LIKE ".."). I believe you have to switch syntax. Something like (this uses regular expressions, rather than %): eval a=mvfilter(NOT match(eventtype, "\..*$")) | search a=*

(05 Jun '11, 08:52) mw

To be clear, you can use mvfilter(match(...)) and mvfilter(NOT match(...)), mvfilter(like(...)), etc

(05 Jun '11, 09:23) mw
link

answered 03 Aug '12, 06:43

brettcave's gravatar image

brettcave
35379
accept rate: 29%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×72
×58
×3

Asked: 31 May '11, 16:36

Seen: 1,031 times

Last updated: 03 Aug '12, 06:43

Copyright © 2005-2012 Splunk Inc. All rights reserved.