Reporting

Combine searches into 1 search

gnovak
Builder

Hello,

I have 3 saved searches that are pretty much all the same except for the source. the searches are:

sourcetype="cron_BalanceEmail" source="asia" starthoursago="1" BalanceEmail sent | rex field=_raw "[BalanceEmail](?[\d]+) of (?[\d]+) of email notification sent." | where TotalEmailsSent < TotalEmailsToSend

sourcetype="cron_BalanceEmail" source="info" starthoursago="1" BalanceEmail sent | rex field=_raw "[BalanceEmail](?[\d]+) of (?[\d]+) of email notification sent." | where TotalEmailsSent < TotalEmailsToSend

sourcetype="cron_BalanceEmail" source="org" starthoursago="1" BalanceEmail sent | rex field=_raw "[BalanceEmail](?[\d]+) of (?[\d]+) of email notification sent." | where TotalEmailsSent < TotalEmailsToSend

As you can see all are the same except for the source. I tried altering the search to say maybe source=asia AND info AND org but I must not be getting it right. anyone have any ideas? It's probably right in front of my face but I just can't see it.

Tags (1)

gnovak
Builder

That worked. Doh! I guess i should have used OR instead of AND...thanks

0 Karma

chris
Motivator

I'm glad that your query works now. Happy splunking 🙂

0 Karma

chris
Motivator

Try this:

sourcetype="cron_BalanceEmail" (source="asia" OR source="info" OR source="org") starthoursago="1" BalanceEmail sent | rex field=_raw "[BalanceEmail](?[\d]+) of (?[\d]+) of email notification sent." | where TotalEmailsSent < TotalEmailsToSend

I hope this works for you if not let me know.

Chris

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 ...