Splunk Search

Append 2 tables. Gets "Missing or malformed messages.conf stanza for SEARCHFACTORY:UNKNOWN_OP__index" error

niyaz006
Path Finder

I am trying to append to search results which displays the same column headers. However I am getting the error: Missing or malformed messages.conf stanza for SEARCHFACTORY:UNKNOWN_OP__index

index="main" 
| stats sum(effort) as value by category
| append 
[ index="main" |  stats count as value by category ]
Tags (1)
0 Karma
1 Solution

woodcock
Esteemed Legend

You are missing the keyword search inside of your subsearch; try this:

index="main" | stats sum(effort) as value by category 
| append [ search index="main" | stats count as value by category ]

But there is a better way; try this:

index="main" 
| multireport
[ stats sum(effort) AS value BY category ]
[ stats count AS value BY category ]

Or best of all, this:

index="main" 
| stats sum(effort) AS effort count AS count BY category

View solution in original post

niyaz006
Path Finder

index="main"
| eval metric_name = "count:effort"
| eval metric_name = split(metric_name,":")
| mvexpand metric_name
| eval _value = case(metric_name="count", 1, metric_name="effort", effort)
| table metric_name, _value, category

0 Karma

woodcock
Esteemed Legend

You are missing the keyword search inside of your subsearch; try this:

index="main" | stats sum(effort) as value by category 
| append [ search index="main" | stats count as value by category ]

But there is a better way; try this:

index="main" 
| multireport
[ stats sum(effort) AS value BY category ]
[ stats count AS value BY category ]

Or best of all, this:

index="main" 
| stats sum(effort) AS effort count AS count BY category
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...