Dashboards & Visualizations

convert timeformat not responding in drilldown link search in simple xml

ssujin
Explorer

convert timeformat not responding with drilldown link tag, as a result drilldown search keep on showing loading. Sample simple xml below

<row>
    <panel name="Job Statistics">
        <table>
            <title>Job Statistics</title>
            <search>
                <query>index=$index$ host=$host$ eventtype=et_job_timing | eval Time=_time | convert timeformat="%d-%m-%Y:%H:%M:%S" ctime(Time)| table Time, THROUGHPUT | chart values(THROUGHPUT) by Time</query>
            </search>
            <option name="drilldown">cell</option>
            <drilldown>
                <link>search?q=search index=$index$ host=$host$ eventtype=et_job_timing| eval Time=_time | convert timeformat="%d-%m-%Y:%H:%M:%S" ctime(Time)| table Time, THROUGHPUT | where Time = "$click.value$"</link>
            </drilldown>
        </table>
    </panel>
</row>

from above simple xml below mentioned search not responding.

search?q=search index=$index$ host=$host$ eventtype=et_job_timing| eval Time=_time | convert timeformat="%d-%m-%Y:%H:%M:%S" ctime(Time)| table Time, THROUGHPUT | where Time = "$click.value$"

kindly guide me on this error.

0 Karma
1 Solution

HiroshiSatoh
Champion

convert command It looks like no good.
Workaround:
Macro the convert.

my_macro:convert timeformat="%d-%m-%Y:%H:%M:%S" ctime(Time)

search?q=search index=$index$ host=$host$ eventtype=et_job_timing| eval Time=_time |‘my_macro‘| table Time, THROUGHPUT | where Time = "$click.value$"

View solution in original post

sundareshr
Legend

What are you trying to do? You cannot do an eval in link. Link requires a valid URL that will be launched. You can pass token values as querystring, but you will need to format them earlier. In short, what you have here will not work, but if you can explain what it is that you are trying to accomplish in your dashboard, we can help.

0 Karma

HiroshiSatoh
Champion

convert command It looks like no good.
Workaround:
Macro the convert.

my_macro:convert timeformat="%d-%m-%Y:%H:%M:%S" ctime(Time)

search?q=search index=$index$ host=$host$ eventtype=et_job_timing| eval Time=_time |‘my_macro‘| table Time, THROUGHPUT | where Time = "$click.value$"

ssujin
Explorer

Thanks lot. It worked perfectly.

0 Karma
Get Updates on the Splunk Community!

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

.conf24 | Personalize your .conf experience with Learning Paths!

Personalize your .conf24 Experience Learning paths allow you to level up your skill sets and dive deeper ...