Dashboards & Visualizations

Drawing graph for dynamic key and value

adr2609
Engager

My Splunk Objects looks like this:-

Obj1:-
{
    time: x1
    type:"info"
    data: {
        0:12
        1:13
        2:12
        3:17
    }
}

Obj2:-
{
    time: x1
    type:"info"
    data: {
        4:16
        5:12
        6:14
        7:19
    }
}

I want to draw a timechart with key as data.* and value as value(data.*)

I tried using this query

 type=info  | timechart  values(data.0) as 0, values(data.1) as 1, values(data.2) as 2, values(data.3) as 3, values(data.4) as 4, values(data.5) as 5, values(data.6) as 6, values(data.7) as 7

and this worked fine for me.
But I want to extend this query to number 'n' and avoid having multiple values(attrs.x) as x

Is there a simpler way to do it?

0 Karma
1 Solution

renjith_nair
Legend

@adr2609,

timechart  values(data.*) as *
---
What goes around comes around. If it helps, hit it with Karma 🙂

View solution in original post

renjith_nair
Legend

@adr2609,

timechart  values(data.*) as *
---
What goes around comes around. If it helps, hit it with Karma 🙂
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...