Learn How We Can Help You Keep Teleworkers Protected During the COVID-19 Crisis

Reporting

Reply
Highlighted

Port Capacity Trend Report

Adviser
Posts: 244
2928     0
<form>
  <label>Port Capacity Trend</label>
  <description>System-created dashboard: Please clone before editing.</description>
  <fieldset submitButton="true" autoRun="true">
    <input type="time" token="time">
      <label>Time</label>
      <default>
        <earliest>-1w</earliest>
        <latest>-1d</latest>
      </default>
    </input>
    <input type="dropdown" token="network_view">
      <label>Network View</label>
      <choice value="All">All</choice>
      <search>
        <query>source=ib:discovery:port_capacity index=ib_discovery
               | stats count by NETWORK_VIEW</query>
        <earliest>$time.earliest$</earliest>
        <latest>$time.latest$</latest>
      </search>
      <fieldForLabel>NETWORK_VIEW</fieldForLabel>
      <fieldForValue>NETWORK_VIEW</fieldForValue>
      <change>
        <condition value="All">
          <set token="network_view_str"> </set>
        </condition>
        <condition value="*">
          <set token="network_view_str">NETWORK_VIEW="$value$"</set>
        </condition>
      </change>
      <default>All</default>
    </input>
    <input type="text" token="device_name">
      <label>Device Name (eg: *foo*)</label>
      <default>All</default>
      <change>
        <condition value="All">
          <set token="device_name_str"> </set>
        </condition>
        <condition value="*">
          <set token="device_name_str">DEVICE_NAME="$value$"</set>
        </condition>
      </change>
    </input>
  </fieldset>
  <row>
    <panel>
      <chart>
        <search>
          <query>source=ib:discovery:port_capacity index=ib_discovery
                 $device_name_str$
                 $network_view_str$
                 | timechart span=1d dc(EVTIME) as DAILY_SNAPSHOT_COUNT sum(TOTAL_AVAIL_COUNT)  as SUM_TOTAL_AVAIL_COUNT sum(ADM_UP_OP_UP_COUNT) as SUM_ADM_UP_OP_UP_COUNT sum(ADM_UP_OP_DN_COUNT) as SUM_ADM_UP_OP_DN_COUNT
                 | eval DAILY_TOTAL_AVAIL_COUNT = round(SUM_TOTAL_AVAIL_COUNT / DAILY_SNAPSHOT_COUNT)
                 | eval DAILY_ADM_UP_OP_UP_COUNT = round(SUM_ADM_UP_OP_UP_COUNT / DAILY_SNAPSHOT_COUNT)
                 | eval DAILY_ADM_UP_OP_DN_COUNT = round(SUM_ADM_UP_OP_DN_COUNT / DAILY_SNAPSHOT_COUNT)
                 | eval "Admin-Down/Operation-Down" = DAILY_TOTAL_AVAIL_COUNT - DAILY_ADM_UP_OP_UP_COUNT - DAILY_ADM_UP_OP_DN_COUNT
                 | rename DAILY_TOTAL_AVAIL_COUNT  as "Total Available" DAILY_ADM_UP_OP_UP_COUNT as "Admin-Up/Operation-Up" DAILY_ADM_UP_OP_DN_COUNT as "Admin-Up/Operation-Down"
                 | fields - DAILY_SNAPSHOT_COUNT SUM_TOTAL_AVAIL_COUNT SUM_ADM_UP_OP_UP_COUNT SUM_ADM_UP_OP_DN_COUNT</query>
          <earliest>$time.earliest$</earliest>
          <latest>$time.latest$</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.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">line</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.showDataLabels">none</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">none</option>
        <option name="charting.layout.splitSeries">0</option>
        <option name="charting.layout.splitSeries.allowIndependentYRanges">0</option>
        <option name="charting.legend.labelStyle.overflowMode">ellipsisMiddle</option>
        <option name="charting.legend.placement">right</option>
        <option name="charting.axisTitleX.text">Time</option>
        <option name="charting.axisTitleY.text">Port Count</option>
        <option name="charting.axisLabelsY.majorUnit">250</option>
      </chart>
    </panel>
  </row>
</form>
If you appreciate my efforts, please give me a kudo ↓ or Accept as solution to help others find it faster.
Highlighted

Re: Port Capacity Trend Report

Posts: 1
2929     0

This feels like a stupid question but when I try to import this as an xml custom report it tellls me "A report cannot be imported with a blank name..."

 

Any ideas on what I'm doing wrong?

 

I am simply going to the Report Gallery and clicking 'Import Custom Report" and then selecting the xml file containing the source code you provided for the report and try to import.

Highlighted

Re: Port Capacity Trend Report

Adviser
Posts: 97
2929     0

Hello,

 

The XML code being provided is actually for a dashboard. You'll need to go to the dashboards tab, click "Create New Dashboard", give it a name and click "Create Dashboard". Once created it will bring you the the new (blank) dashboard, you will then need to click "Edit Source" and replace the existing code with the code you would like to use.

Showing results for 
Search instead for 
Do you mean 

Recommended for You