Dashboards & Visualizations

Creating a drop-down box with Simple XML, why am I getting "duplicate labels..." error?

bidahor13
Path Finder

Hi,

So, I'm trying to create a drop-down box to show the transfer bits for each interface as Tx_IN and Tx_out on two separate charts, but just after populating - i.e at the tab, it says " duplicate labels causing " . I've gone through the search line by line and I can't find the duplicates. Need help!

here is my XML:

0 Karma
1 Solution

somesoni2
Revered Legend

Try this for your search for dropdown

index=snmp src_device!=NULL | eval link=if(src_device<dst_device, src_device, dst_device) . "<->" . if(src_device<dst_device, dst_device, src_device) | stats count by link

View solution in original post

somesoni2
Revered Legend

Try this for your search for dropdown

index=snmp src_device!=NULL | eval link=if(src_device<dst_device, src_device, dst_device) . "<->" . if(src_device<dst_device, dst_device, src_device) | stats count by link

MuS
Legend

bidahor13
Path Finder

isl acticvity

<input type="dropdown" token="isl" searchWhenChanged="true">
  <label>interface_name</label>
  <search>
    <query>index=snmp src_device!=NULL | eval link=if(src_device&lt;dst_device, src_device, dst_device) . "&lt;-&gt;" . if(src_device&lt;dst_device, dst_device, src_device) | search link=$isl$ |reverse |delta _time as period | eval transferedBitsIn=snmpIfInOctets*8/period | eval transferedBitsOut=snmpIfOutOctets*8/period | eval transferedBitsOutGB= round((transferedBitsOut/8)/1024/1024/1024,2) | eval transferedBitsInGB= round((transferedBitsIn/8)/1024/1024/1024,2)| timechart span=10m avg(transferedBitsInGB) as TX_IN avg(transferedBitsOutGB) as TX_OUT by link</query>
  </search>
  <fieldForLabel>link</fieldForLabel>
  <fieldForValue>link</fieldForValue>
  <choice value="*">All</choice>
  <default>*</default>
</input>
<input type="time" searchWhenChanged="true">
  <label></label>
  <default>
    <earliest>-4h@m</earliest>
    <latest>now</latest>
  </default>
</input>


<panel>
  <title>Tx_in GBps $isl$</title>
  <chart>
    <search>
      <query>index=snmp src_device!=NULL | eval link=if(src_device&lt;dst_device, src_device, dst_device) . "&lt;-&gt;" . if(src_device&lt;dst_device, dst_device, src_device) | reverse |delta _time as period | eval transferedBitsIn=snmpIfInOctets*8/period | eval transferedBitsOut=snmpIfOutOctets*8/period | eval transferedBitsOutGB= round((transferedBitsOut/8)/1024/1024/1024,2) | eval transferedBitsInGB= round((transferedBitsIn/8)/1024/1024/1024,2)| timechart span=10m avg(transferedBitsInGB) as TX_IN avg(transferedBitsOutGB) as TX_OUT by link</query>
      <earliest>-4h@m</earliest>
      <latest>now</latest>
    </search>
    <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
    <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
    <option name="charting.axisTitleX.visibility">visible</option>
    <option name="charting.axisTitleY.text">ISL</option>
    <option name="charting.axisTitleY.visibility">visible</option>
    <option name="charting.axisTitleY2.visibility">visible</option>
    <option name="charting.axisX.scale">linear</option>
    <option name="charting.axisY.scale">linear</option>
    <option name="charting.axisY2.enabled">0</option>
    <option name="charting.axisY2.scale">inherit</option>
    <option name="charting.chart">area</option>
    <option name="charting.chart.bubbleMaximumSize">50</option>
    <option name="charting.chart.bubbleMinimumSize">10</option>
    <option name="charting.chart.bubbleSizeBy">area</option>
    <option name="charting.chart.nullValueMode">zero</option>
    <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
    <option name="charting.chart.stackMode">default</option>
    <option name="charting.chart.style">shiny</option>
    <option name="charting.drilldown">all</option>
    <option name="charting.layout.splitSeries">0</option>
    <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
    <option name="charting.legend.placement">right</option>
    <option name="charting.axisTitleY.text">Tx IN GBps</option>
  </chart>
</panel>


<panel>
  <title>Tx_out GBps:$isl$</title>
  <chart>
    <search>
      <query>index=snmp src_device!=NULL | eval link=if(src_device&lt;dst_device, src_device, dst_device) . "&lt;-&gt;" . if(src_device&lt;dst_device, dst_device, src_device) | reverse |delta _time as period | eval transferedBitsIn=snmpIfInOctets*8/period | eval transferedBitsOut=snmpIfOutOctets*8/period | eval transferedBitsOutGB= round((transferedBitsOut/8)/1024/1024/1024,2) | eval transferedBitsInGB= round((transferedBitsIn/8)/1024/1024/1024,2)| timechart span=10m avg(transferedBitsInGB) as TX_IN avg(transferedBitsOutGB) as TX_OUT by link</query>
    </search>
    <option name="charting.axisLabelsX.majorLabelStyle.overflowMode">ellipsisNone</option>
    <option name="charting.axisLabelsX.majorLabelStyle.rotation">0</option>
    <option name="charting.axisTitleX.visibility">visible</option>
    <option name="charting.axisTitleY.visibility">visible</option>
    <option name="charting.axisTitleY2.visibility">visible</option>
    <option name="charting.axisX.scale">linear</option>
    <option name="charting.axisY.scale">linear</option>
    <option name="charting.axisY2.enabled">false</option>
    <option name="charting.axisY2.scale">inherit</option>
    <option name="charting.chart">area</option>
    <option name="charting.chart.bubbleMaximumSize">50</option>
    <option name="charting.chart.bubbleMinimumSize">10</option>
    <option name="charting.chart.bubbleSizeBy">area</option>
    <option name="charting.chart.nullValueMode">gaps</option>
    <option name="charting.chart.sliceCollapsingThreshold">0.01</option>
    <option name="charting.chart.stackMode">default</option>
    <option name="charting.chart.style">shiny</option>
    <option name="charting.drilldown">all</option>
    <option name="charting.layout.splitSeries">0</option>
    <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
    <option name="charting.legend.placement">right</option>
    <option name="charting.axisTitleY.text">Tx in GBps</option>
  </chart>
</panel>
0 Karma
Get Updates on the Splunk Community!

Splunk App for Anomaly Detection End of Life Announcment

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...