Splunk Search

List different lines even when not found

leonardomassard
Explorer

I had the follow data
index=os sourcetype=top host=xxxxxxx
| search COMMAND = "startWebworksAd" OR COMMAND="startWLSServer" OR COMMAND="startManagedWeb" OR COMMAND="launch.sh"
| table host, COMMAND

vmwl5167 startWebworksAd

vmwl5167 startWLSServer

vmwl5167 startManagedWeb

This data is based on top command on linux so if the process is not running so into the splunk the process will not have data been updating, I whish list the process on the query even when this situation occur count line by line and when not found they list as 0

vmwl5167 launch.sh 0
vmwl5167 startWebworksAd 1
vmwl5167 startWLSServer 1
vmwl5167 startManagedWeb 1

How do it?

Tags (1)
0 Karma

somesoni2
Revered Legend

Is the name of command fixed? Will there always be finite list of command that you search in a host?

0 Karma

leonardomassard
Explorer

Is the name of command fixed? Will there always be finite list of command that you search in a host?

Yes the name of command will be fixed.

0 Karma
Get Updates on the Splunk Community!

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...