Splunk Search

How to change time interval on x-axis of a graph to 10 minutes instead of 1 hour using dbquery?

usha_nittala
New Member

Hi All,
Is there any way we can change the time interval on x-axis to be 10 mins instead of 1 hour using dbquery.

My sample query looks like this:

| dbquery testDB "select SRC_DB,TOTALLAG,DELGROUP,EXTRACT_NAME,UPDATE_TIMESTAMP from COMDBA_ID.GGS_HEARTBEAT_HISTORY" | rename UPDATE_TIMESTAMP as time | convert timeformat="%d" ctime(time) AS date | convert timeformat="%H" ctime(time) AS hour  | chart avg(TOTALLAG) as TOTALLAG by hour DELGROUP

Thanks in advance.

Usha

Tags (2)
0 Karma
1 Solution

strive
Influencer

In your search you are calculating average by per hour basis. That means every one hour you will have one point to plot on chart. If you want it to be every 10 minutes then you need to change your search.

View solution in original post

strive
Influencer

In your search you are calculating average by per hour basis. That means every one hour you will have one point to plot on chart. If you want it to be every 10 minutes then you need to change your search.

strive
Influencer

Yes. Set time buckets of 10 minutes and then calculate average using your chart command.
One suggestion -- I do not see the usage of date in your search, so you can stop extracting date.

0 Karma

usha_nittala
New Member

Thanks strive, so do I need to use something like sysdate in my dbquery or use some option with chart?

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