Splunk Search

How to integrate dbxquery query with Splunk search

aditsss
Motivator

 

 

Labels (1)
0 Karma

aditsss
Motivator
 
0 Karma

richgalloway
SplunkTrust
SplunkTrust

Patience, Grasshopper.  You posted on a Sunday when most users are living their lives rather than hanging out here.  Even on work days, it may take a while to get an answer, especially when the question doesn't describe the desired result.

Have you tried using append to combine the two queries?

|dbxquery query="SELECT \"id\", \"name\", \"chain\" FROM flows;" connection="Postgres"
| append [ search index=xyz sourcetype=xy source="logs" groups (CLIENT_Id ="*") |rex field=Request_URL "\/(?<Group>[^\/]+)$"
  | convert timeformat="%Y-%m-%d" ctime(_time) AS Date
  | stats count by Date CLIENT_Id GroupRequest_URL
  | sort - CLIENT_Id
  | rename Group as id ]
| stats values(*) as * by id

 

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

aditsss
Motivator
 
0 Karma

richgalloway
SplunkTrust
SplunkTrust
Remove the final stats command and check the results to see if the DB fields are present.
---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...