Knowledge Management

How do I search in the events message to count for DCOM, RPC, login?

splunkermm
Engager

Events:

Message = "This system has RPC error"
Message = "This system has login failure error"
Message = "This system has DCOM error"
Message = "This system has RPC error"
Message = "This system has login failure error"
Message = "This system has DCOM error"
Message = "This system has RPC error"
Message = "This system has login failure error"
Message = "This system has DCOM error"
Message = "This system has RPC remote error"
Message = "This system has login failure error"
Message = "This system has DCOM error"
Message = "This system has RPC error"
Message = "This system has login failure error"
Message = "This system has DCOM issue"
Message = "This system has RPC error"
Message = "This system has login failure error"
Message = "This system has DCOM error"
Message = "This system has login failure error"
Message = "This system has DCOM error"
Message = "This system has no error"
Message = "This system has fatal error"
Message = "This system has no fatal error"
Message = "This system has no CPU error"
Message = "This system has memory issue"


How do i search in the above Events Message to count for DCOM, RPC, login ?

For example:
in the above example how should I get the results as below:
DCOM = 7
RPC = 6
login = 7
Total Message count = 25

Thanks for your time!

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

That changes things a bit.  Since the messages don't fit a pattern, coming up with a regex to extract the word of interest is more challenging.  With just a screenshot to work with, it's impossible to test possible solutions.

I can say, however, that the answer likely will use timechart instead of stats.

...
| timechart count by type

 

---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

That changes things a bit.  Since the messages don't fit a pattern, coming up with a regex to extract the word of interest is more challenging.  With just a screenshot to work with, it's impossible to test possible solutions.

I can say, however, that the answer likely will use timechart instead of stats.

...
| timechart count by type

 

---
If this reply helps you, Karma would be appreciated.

richgalloway
SplunkTrust
SplunkTrust

It would help to know what you've tried so far so we know not to suggest the same thing.

Perhaps this will get you started.

index=foo "This system has *"
| rex "This system has (?<type>.*?) error"
| eventstats count as total
| stats count, max(total) as total by type
| rename total as "Total Message count"
---
If this reply helps you, Karma would be appreciated.
0 Karma

splunkermm
Engager

Thanks richgalloway. for your time. but still i am not getting what i want. let me rephrase my question:

I have events for the period of time and i would like to get how many different messages including duplicates.

For example:

I have system events for the last 12 months. And these events have field name called Messages. Example of messages as below:

splunkermm_0-1684770466883.png


In the above list:

Message contains "logon failure" counts 7 times, "DCOM counts 2 times, "Group Policy failed" counts 2 times, "RPC" counts 2 times, "DomainController" counts 2 times, "DSS" counts 3 times.

How do I show the line graph, by top counts over time frame – X axis is time, Y axis is the count – with one line for each different messages.

Thanks for your time.

 



 

Tags (1)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...