Splunk Search

what is the splunk command that when search all and see all different kind of log as a whole?

hoyeunglee
New Member

what is the splunk command that when search all and see all different kind of log as a whole
and that can parse any delimiter and any format to get column name and value and result a big table like Excel
such as if there is no such column if come from different kind of log, it fill in empty.

xxxxxxxx, xxxxx product : hello
log xxxxx ,   xxxxx serial number=3000
xxxxxxxx, xxxxx product : hello2


product serial number
hello
                    3000
hello2
Tags (1)
0 Karma

woodcock
Esteemed Legend

I get it now, you probably are looking for kv (also known as extract😞
https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Extract

Be sure to check out the commands in the See also section.

0 Karma

hoyeunglee
New Member

can you demonstrate how to become a table?

hostname | extract pairdelim="=", kvdelim="=" | multikv fields Hostname

is there any industrial experience knowledge that can extract any delimiter?

0 Karma

woodcock
Esteemed Legend

using the same character for both delims is bound to be wrong; try this:

...| extract kvdelim="=:" | rename number AS serial_number
0 Karma

hoyeunglee
New Member

i find spacy that can be trained to identify ip address etc , originally i think splunk can identify header for values automatically.

0 Karma

hoyeunglee
New Member

sometimes log do not have column name , or it has column name but the delimiter is a space, it seems splunk is not using meta learning to automate get header and value pair in log. it need manually get header and value.

0 Karma

woodcock
Esteemed Legend

If your event has a header row and then other rows (in the same event), like output from df command, then use multikv.

0 Karma

jslee
Explorer

If you want to search all log, you must have "index=* | " in your SPL

0 Karma

woodcock
Esteemed Legend

You probably mean | table * but if not, perhaps you might like fieldsummary or maybe even cluster.

DalJeanis
Legend

@hoyeunglee - Lots of good here. They probably told you what you need to know if we understood your question right.

I'm betting that @woodcock's fieldsummary is the one you are looking for.

The one suggestion that I'd add is that you should put a |head 10 or | dedup index at the beginning before | fieldsummary, so that you don't end up with a completely unmanageable result.

0 Karma

hoyeunglee
New Member

i find meta learning can do data preprocessing such as auto pick column and value, is splunk using this?

0 Karma

hoyeunglee
New Member

i updated question, actually i mean a big excel table after parse with regex for any format and any delimiter

0 Karma

HiroshiSatoh
Champion

search all

->index=* OR index=_*

However, if all indexes have authority.

all different kind of log

->stats count,dc(source),values(source) by sourcetype

An example.

such as if there is no such column if come from different kind of log, it fill in empty.
->Except for the default field, it is defined for each source and source type. It will not be displayed if it does not meet the conditions.
https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/Data/Aboutdefaultfields

0 Karma

hoyeunglee
New Member

i updated question, actually i mean a big excel table after parse with regex for any format and any delimiter

0 Karma
Get Updates on the Splunk Community!

Detecting Brute Force Account Takeover Fraud with Splunk

This article is the second in a three-part series exploring advanced fraud detection techniques using Splunk. ...

Buttercup Games: Further Dashboarding Techniques (Part 9)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Buttercup Games: Further Dashboarding Techniques (Part 8)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...