Splunk Search

How to create a dashboard when required fields are not present in the event logs?

moiezuddin
Explorer

I have a source="/opt/www/logs

i need the fields jobTitle, orgName, orgSegment, parentOrgname, and userType

Can anyone help provide the search?

0 Karma

chimell
Motivator

Hi
If the file contain these fields
try like this

source="/opt/www/logs" | table jobTitle orgName orgSegment parentOrgname userType
0 Karma

gyslainlatsa
Motivator

hi moiezuddin,

it is necessary to extract these fields using regular expressions before achieving dashboards using these fields. And for that you need to identify in your data the values corresponding to each field you need.
eg extraction of the field at random from your data:
source="dashboard_field.csv" host="student09-PC" index="field" sourcetype="csv" |rex "^[^'\n]*'(?P\w+'\))" |table type

this allows to retrieve the values of a certain type field that I choose.
try this and let me know if it works. or or you send me the file with which you work at gyslainko@gmail.com, and I'll help you extract these fields and then send you the regular expressions that you will use to work with.

please forgive my english. after

0 Karma
Get Updates on the Splunk Community!

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...