Reporting

How to create a dynamic report ?

Lossino
New Member

I'am managing trx with fields status,type,bank,....
I would like to create a histogram report [number of trx by day per type in the last 365 day for example]
And I was wondering wether it's possible to set up two dynamics paramaters ?
I mean first one on bank field which allow me to specify a bank. And the second one on timerange which will allow me to change period from 1 day to 30 days.

Thank you in advance for any help.

Tags (1)
0 Karma
1 Solution

lguinn2
Legend

Take a look at the form search. You can specify one or more inputs at the top of the page, and then display your histogram at the bottom.

It might look something like this

 <form>
    <label>Simple Form</label>
    <!-- Replace the following search with whatever you actually want to report-->
    <searchTemplate>sourcetype=whatever bank=$bankselection$</searchTemplate>
    <fieldset>
        <input type="dropdown" token="bankselection">
            <label>Select Bank</label>
            <!-- Replace the following search with one that gives you a list of the banks to select from -->
            <populatingSearch fieldForValue="bank" fieldForLabel="bank">
                <![CDATA[sourcetype=bankdata earliest=-30d | stats count by bank]]></populatingSearch>
                <choice value="*">Any</choice>
        </input>
        <input type="time"/>
    </fieldset>
    <row>
        <chart>
            <title>Data for selected Bank</title>
            <option name="charting.chart">bar</option>
        </chart>
    </row>
</form>

View solution in original post

0 Karma

lguinn2
Legend

Take a look at the form search. You can specify one or more inputs at the top of the page, and then display your histogram at the bottom.

It might look something like this

 <form>
    <label>Simple Form</label>
    <!-- Replace the following search with whatever you actually want to report-->
    <searchTemplate>sourcetype=whatever bank=$bankselection$</searchTemplate>
    <fieldset>
        <input type="dropdown" token="bankselection">
            <label>Select Bank</label>
            <!-- Replace the following search with one that gives you a list of the banks to select from -->
            <populatingSearch fieldForValue="bank" fieldForLabel="bank">
                <![CDATA[sourcetype=bankdata earliest=-30d | stats count by bank]]></populatingSearch>
                <choice value="*">Any</choice>
        </input>
        <input type="time"/>
    </fieldset>
    <row>
        <chart>
            <title>Data for selected Bank</title>
            <option name="charting.chart">bar</option>
        </chart>
    </row>
</form>
0 Karma

Lossino
New Member

Thx for your help very helpfull for me.

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