Reply

Port Capacity Utilization by Device Report

Adviser
Posts: 267
1290     0
<form>
  <label>Port Capacity Utilization by Device</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>-1d@d</earliest>
        <latest>-1d@d+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</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>
      <table>
        <search>
          <query>source=ib:discovery:port_capacity index=ib_discovery
                 $network_view_str$
                 $device_name_str$ 
                 | stats avg(TOTAL_AVAIL_COUNT)  as AVG_TOTAL_AVAIL_COUNT avg(ADM_UP_OP_UP_COUNT) as AVG_ADM_UP_OP_UP_COUNT avg(ADM_UP_OP_DN_COUNT) as AVG_ADM_UP_OP_DN_COUNT by NETWORK_VIEW DEVICE_NAME  
                 | eval DAILY_TOTAL_AVAIL_COUNT = round(AVG_TOTAL_AVAIL_COUNT)
                 | eval DAILY_ADM_UP_OP_UP_COUNT = round(AVG_ADM_UP_OP_UP_COUNT)
                 | eval DAILY_ADM_UP_OP_DN_COUNT = round(AVG_ADM_UP_OP_DN_COUNT) 
                 | eval "Admin-Down/Operation-Down" = DAILY_TOTAL_AVAIL_COUNT - DAILY_ADM_UP_OP_UP_COUNT - DAILY_ADM_UP_OP_DN_COUNT
                 | rename DEVICE_NAME as "Device Name" NETWORK_VIEW as "Network View" 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"   
                 | table "Device Name" "Admin-Up/Operation-Up" "Admin-Down/Operation-Down" "Admin-Up/Operation-Down" "Total Available" "Network View"   
                 | sort +str("Device Name") +str("Network View")</query>
          <earliest>$time.earliest$</earliest>
          <latest>$time.latest$</latest>
        </search>
        <option name="wrap">true</option>
        <option name="rowNumbers">true</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="count">10</option>
      </table>
    </panel>
  </row>
</form>
If you appreciate my efforts, please give me a kudo ↓ or Accept as solution to help others find it faster.
Showing results for 
Search instead for 
Do you mean 

Recommended for You