All Apps and Add-ons

sideview util using simple gate blocking search

sumitnagal
Path Finder

I am try to implement this basic example using , I have lookup host_env_mapping which execute below search from there I am doing pulldown for environment and setting static options as follow. I am not able to proceed as I am getting "Pulldown.html - View CONFIGRATION ERROR - you have specified a element with no element" on second pulldown. I am not sure if my lookup have some issue. though my below lookup command is working fine. I am giving sample host_env_mapping file for reference in end,


<![CDATA[
| inputlookup host_env_mapping | dedup environment,zone,datacenter | table host hostname datacenter environment information nodetype project zone

]]>

<module name="Pulldown">
  <param name="postProcess">dedup $name$ | sort $name$</param>
  <param name="template">environment="$value$"</param>
  <param name="name">environment</param>
  <param name="label">environment</param>
  <param name="valueField">$name$</param>
  <param name="staticOptions">
    <list>
      <param name="label">Select...</param>
      <param name="value">ZOMG</param>
    </list>
  </param>

  <module name="Search">
    <param name="search"><![CDATA[

| inputlookup host_env_mapping | search $environment$

]]>

    <module name="Pulldown">
      <param name="postProcess">dedup $name$ | sort $name$</param>
      <param name="template">hostname="$value$"</param>
      <param name="name">hostname</param>
      <param name="label">hostname</param>
      <param name="valueField">$name$</param>
      <param name="staticOptions">
        <list>
          <param name="label">Select...</param>
        </list>
      </param>

      <module name="Gate">
        <param name="requiredKeys">environment,hostname</param>

        <module name="Search">
          <param name="search"><![CDATA[

| inputlookup host_env_mapping| search $environment$ $hostname$ |table environment,zone,datacenter

]]>

          <module name="HiddenChartFormatter">
            <param name="charting.chart">line</param>

            <module name="JSChart" />
          </module>
        </module>
      </module>
    </module>
  </module>
</module>


<!-- EXAMPLE END -->

host_env_mapping.csv
datacenter,environment,host,hostname,information,nodetype,other1,other2,project,zone
ABC,XYZ,test123.test.com,test123,Execution,web-01,test,test1,Agg,Zone-A

0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

The error message is talking about the value you have set for the staticOptions param, in your Pulldown module.

<param name="staticOptions">
  <list>
    <param name="label">Select...</param>
  </list>
</param>

You've created an option that has only a "label" and has no "value" and this is a configuration error. Add some kind of "value", even if it's just an empty value <param name="value"></param> such that your staticOptions param looks like:

<param name="staticOptions">
  <list>
    <param name="label">Select...</param>
    <param name="value"></param>
  </list>
</param>

The error message could definitely be more specific and more clear so I'll update it to be more easily understood.

View solution in original post

0 Karma

sideview
SplunkTrust
SplunkTrust

The error message is talking about the value you have set for the staticOptions param, in your Pulldown module.

<param name="staticOptions">
  <list>
    <param name="label">Select...</param>
  </list>
</param>

You've created an option that has only a "label" and has no "value" and this is a configuration error. Add some kind of "value", even if it's just an empty value <param name="value"></param> such that your staticOptions param looks like:

<param name="staticOptions">
  <list>
    <param name="label">Select...</param>
    <param name="value"></param>
  </list>
</param>

The error message could definitely be more specific and more clear so I'll update it to be more easily understood.

0 Karma

sideview
SplunkTrust
SplunkTrust

Aha. I see the problem. For now just put a single space character in the value, for the entry in staticOptions. Yes the Editor mistakenly omits the value from staticOptions in this case, when what it should do is create a value node with a null value. I will put in a fix for this. Most of the time when people need a single static option, the default one is what they want (ie if you omit staticOptions entirely, you get a "all/*" option there. )

0 Karma

sumitnagal
Path Finder

I got this, but now when I am editing using sideview editor it is not creating above mentioned param null value, it create below. which make difficult to find, as same example is working in help modules.


Select...

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...