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
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Event Series: Telemetry Pipeline Management

Balancing Scale and Spend: Gaining Control Over High-Volume Metrics in Splunk Observability Cloud As ...

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...

Deep insights, no barriers: Splunk Observability Cloud Free Edition

As software delivery cycles continue to accelerate, observability shouldn’t be a luxury — it should be a ...