All Apps and Add-ons

I want to send a hostname by parameter. How can I do that?

Path Finder

I made a dashboard and include a dashboard in my web site.
When I call a dashboard , I want to send a hostname by parameter. How can I do that?

ex) http://100.10.x.x:8002/ko-KR/app/FCSC_SMS/TEST?host=hostname

<view template="dashboard.html">
    <module name="HiddenSearch" layoutPanel="panel_row2_col1" autoRun="True">

        <param name="search">index=os sourcetype=cpu 

host=$host$

| multikv fields pctIdle | eval Percent_CPU_Load = 100 - pctIdle | timechart span=1m avg(Percent_CPU_Load) as CPU(%)

        <param name="earliest">-1h</param>
        <module name="HiddenChartFormatter">    
            <param name="chart">line</param>
            <module name="FlashChart">
                <param name="width">500px</param>
                <param name="height">260px</param>
            </module>
        </module>
    </module>
 </view>

SplunkTrust
SplunkTrust

when you set up a drilldown in the core Splunk UI, unfortunately the only argument that gets passed is a splunk search expression, ie ?q=search host=someHost

Check out the "UI Examples" app, which has some working examples illustrating drilldown techniques,

http://splunk-base.splunk.com/apps/22333/splunk-ui-examples-app-for-41

and you can check out the documentation on the site as well.

http://docs.splunk.com/Documentation/Splunk/4.2.3/User/UnderstandTableandChartDrilldownActions

You might also want to check out the Sideview Utils app on Splunkbase, as among other things, that app offers a new and improved way to link from view to view.

http://splunk-base.splunk.com/apps/22279/sideview-utils

In your particular case, you would put a Redirector module inside your FlashChart.

<module name="Redirector">
  <param name="url">some_view</param>
  <param name="arg.host">$click.value$</param>
  <param name="arg.earliest">$search.timeRange.earliest$</param>
  <param name="arg.latest">$search.timeRange.latest$</param>
</module>

Then when the user clicks on the FlashChart, it would go to a URL like:

http://100.10.x.x:8002/ko-KR/app/FCSC_SMS/some_view?host=clicked_on_host

Granted, the target view needs to have the URLLoader module present at the top, and you need to read the Sideview Utils documentation in order to understand how to use all this, but for what it's worth you might find the Sideview system easier to use.

0 Karma
Don’t Miss Global Splunk
User Groups Week!

Free LIVE events worldwide 2/8-2/12
Connect, learn, and collect rad prizes
and swag!