Dashboards & Visualizations

Can I build a dashboard using data pulled from DB2 using DB Connect?

ScottMacD82
Engager

I am potentially working on building on a Splunk dashboard. It is meant to take data every day that is in a DB2 database, and put it into a dashboard. I've watched some DB Connect videos but it just shows the data as a report. If I need the data to show as data from today, yesterday, and possibly going back for a data range, would I be able to do that with Splunk/DB Connect pulling that information from DB2?

0 Karma
1 Solution

DalJeanis
Legend

Yes.

Basically, DBConnect gives you access to a data generating command called dbxquery, which can pull data from the database.

You do that with a search, that produces the data for a report.

That same search can be used to power a dashboard.

Literally any dashboard you use is running searches under the covers, sometimes many different searches. There might be a search just to populate a dropdown, another (called a base search) that sits behind the dash and provides pre-chewed data, and then little filtering searches that takes the base search and filters or aggregates it different ways for presentation.

So, first

1) Get DBConnect working to pull a small amount of data data using a fixed, simple, standard SQL query in the connect string.

2) Get it working to send that same fixed query from a dash and show the results.

3) Create a fixed token in the dash using the <set> command, add the token to the query and get the query working.

Once you've done all the above, using a simple no-nonsense query that has very little in the way of moving parts, such as...

`SELECT UserID, UserName from MyDatabase.User WHERE Userid='ABC123'`

...then you should be able to go from there to develop any dash you'd like by progressively adding features.

If you need help working it through, then get onto the Splunk Slack channel, in either the #dbconnect or #dashboard subchannel, depending on the question, and we will help you get through it.

View solution in original post

DalJeanis
Legend

Yes.

Basically, DBConnect gives you access to a data generating command called dbxquery, which can pull data from the database.

You do that with a search, that produces the data for a report.

That same search can be used to power a dashboard.

Literally any dashboard you use is running searches under the covers, sometimes many different searches. There might be a search just to populate a dropdown, another (called a base search) that sits behind the dash and provides pre-chewed data, and then little filtering searches that takes the base search and filters or aggregates it different ways for presentation.

So, first

1) Get DBConnect working to pull a small amount of data data using a fixed, simple, standard SQL query in the connect string.

2) Get it working to send that same fixed query from a dash and show the results.

3) Create a fixed token in the dash using the <set> command, add the token to the query and get the query working.

Once you've done all the above, using a simple no-nonsense query that has very little in the way of moving parts, such as...

`SELECT UserID, UserName from MyDatabase.User WHERE Userid='ABC123'`

...then you should be able to go from there to develop any dash you'd like by progressively adding features.

If you need help working it through, then get onto the Splunk Slack channel, in either the #dbconnect or #dashboard subchannel, depending on the question, and we will help you get through it.

DalJeanis
Legend

@ScottMacD82 - if your question has been answered, please click the "accept" button so that folks will know it is resolved.

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...