Splunk Search

How to calculate the columns and draw charts from SPLUNK DB connect query output

deepthi5
Path Finder

Hello Team,

Here is the issue scenario i am facing i have got a DB with the following columns
ID
SERVICE_NAME
SERVER_ID
volume
START TIME END TIME

I want to draw a chart using these columns. Example:For each server Total items =SUM(VOLUME), processing time= Start time- End time,
I have configured Db connect and retrieved the required columns. now i am not understanding how should i do these calculations to the db query

db query--> Select SERVICE_NAME,Volume from xxxx WHERE SERVICE_NAME='xxxx'

stats sum(Volume) as totalitems by _time,SERVER_ID

can some one tell me how should i combine both

Thanks ,
Deepthi

0 Karma

fdi01
Motivator

to combine both try like this:

|dbquery  YOUR_NAME_DB  "Select SERVICE_NAME,Volume from xxxx WHERE SERVICE_NAME='xxxx' "| stats sum(Volume) as totalitems by _time,SERVER_ID
0 Karma

deepthi5
Path Finder

I have tried that but it did not work out please help me out i am stucked here

0 Karma

vganjare
Builder

Hi deepthi5,

What output you are getting? And what is the expected output?

Thanks.

0 Karma

vganjare
Builder

Hi,

You can try using dbquery command from DBConnect app. You can also combine the splunk commands once you get the results.

http://answers.splunk.com/answers/121145/combine-db-connect-and-search-data.html

More details @ http://docs.splunk.com/Documentation/DBX/latest/DeployDBX/Commands

Thanks,
Vishal

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