Reply
Highlighted

DHCPv4 Usage Statistics With Range Filter

Adviser
Posts: 97
2352     0

 

This is a modified version of the stock DHCPv4 Usage Statistics report to include filtering by number of ranges.

 

screencapture-demogm1-infoblox-ui-hTrnMtq4eXxEMjY6zwcfzg-hTr75-Trn5f-1478199731492.png

<form>
  <label>DHCPv4 Usage Statistics With Range Filter</label>
  <description>Modification of the DHCPv4 Usage Statistics report to include filtering by number of ranges</description>
  <fieldset submitButton="true" autoRun="true">
    <input type="time" token="time">
      <label>Time</label>
      <default>
        <earliest>-1d</earliest>
        <latest>now</latest>
      </default>
    </input>
    <input type="multiselect" token="members">
      <label>Members</label>
      <prefix>(</prefix>
      <suffix>)</suffix>
      <valuePrefix>members="</valuePrefix>
      <valueSuffix>"</valueSuffix>
      <delimiter> OR </delimiter>
      <search>
        <query>sourcetype=ib:dhcp:network index=ib_dhcp 
               | stats count by members</query>
        <earliest>$time.earliest$</earliest>
        <latest>$time.latest$</latest>
      </search>
      <fieldForLabel>members</fieldForLabel>
      <fieldForValue>members</fieldForValue>
      <choice value="*">All</choice>
      <default>*</default>
    </input>
    <input type="dropdown" token="microsoft_servers">
      <label>Microsoft Servers</label>
      <choice value="All">All</choice>
      <search>
        <query>sourcetype=ib:dhcp:network index=ib_dhcp
               | msservers ms_servers
               | eval resolved_names_or_ips=coalesce(ms_resolved_names,ms_resolved_ips)
               | stats count by resolved_names_or_ips</query>
        <earliest>$time.earliest$</earliest>
        <latest>$time.latest$</latest>
      </search>
      <fieldForLabel>resolved_names_or_ips</fieldForLabel>
      <fieldForValue>resolved_names_or_ips</fieldForValue>
      <change>
        <condition value="All">
          <set token="microsoft_servers_str">| noop</set>
        </condition>
        <condition value="*">
          <set token="microsoft_servers_str">| where(ms_resolved_names=="$value$" OR ms_resolved_ips=="$value$")</set>
        </condition>
      </change>
      <default>All</default>
    </input>
    <input type="dropdown" token="network_view">
      <label>Network View</label>
      <choice value="All">All</choice>
      <search>
        <query>sourcetype=ib:dhcp:network index=ib_dhcp
               | stats count by view</query>
        <earliest>$time.earliest$</earliest>
        <latest>$time.latest$</latest>
      </search>
      <fieldForLabel>view</fieldForLabel>
      <fieldForValue>view</fieldForValue>
      <change>
        <condition value="All">
          <set token="network_view_str">*</set>
        </condition>
        <condition value="*">
          <set token="network_view_str">(view="$value$")</set>
        </condition>
      </change>
      <default>All</default>
    </input>
    <input type="text" token="network">
      <label>Network (eg: *.168.1.*)</label>
      <default>All</default>
      <change>
        <condition value="All">
          <set token="network_str">*</set>
        </condition>
        <condition value="*">
          <set token="network_str">(NETWORK="$value$")</set>
        </condition>
      </change>
    </input>
    <input type="text" token="address">
      <label>Address (eg: *.168.1.*)</label>
      <default>All</default>
      <change>
        <condition value="All">
          <set token="address_str">*</set>
        </condition>
        <condition value="*">
          <set token="address_str">(address="$value$")</set>
        </condition>
      </change>
    </input>
    <input type="text" token="cidr_val" searchWhenChanged="false">
      <label>CIDR (eg: =16, &gt;=16)</label>
      <default>&gt;=1</default>
    </input>
    <input type="text" token="dhcp_utilization">
      <label>Utilization % (eg: &gt;10)</label>
      <default>&gt;=0</default>
      <prefix>(dhcp_utilization</prefix>
      <suffix>)</suffix>
    </input>
    <input type="multiselect" token="mssite">
      <label>Active Directory Site</label>
      <choice value="*">All</choice>
      <search>
        <query>sourcetype=ib:dhcp:network index=ib_dhcp
                  | spath input=EA output=MSSITE path=BUILTIN-MSSite
                  | eval MSSITE = if(isnull(MSSITE), "(no_value)", MSSITE)
                  | stats count by MSSITE</query>
        <earliest>$time.earliest$</earliest>
        <latest>$time.latest$</latest>
      </search>
      <fieldForLabel>MSSITE</fieldForLabel>
      <fieldForValue>MSSITE</fieldForValue>
      <default>*</default>
      <prefix>(</prefix>
      <suffix>)</suffix>
      <valuePrefix>MSSITE="</valuePrefix>
      <valueSuffix>"</valueSuffix>
      <delimiter> OR </delimiter>
    </input>
    <input type="text" token="ranges">
      <label>Number of Ranges (eg: &gt;=0)</label>
      <default>&gt;=0</default>
      <prefix>(ranges</prefix>
      <suffix>)</suffix>
    </input>
  </fieldset>
  <row>
    <panel>
      <table>
        <search>
          <query>sourcetype=ib:dhcp:network index=ib_dhcp                 $members$             $network_view_str$             $network_str$             $address_str$             cidr $cidr_val$             
$ranges$ 
$dhcp_utilization$             | spath input=EA output=MSSITE path=BUILTIN-MSSite              | eval MSSITE = if(isnull(MSSITE), "(no_value)", MSSITE)              | mvexpand MSSITE              | search $mssite$             | msservers ms_servers             $microsoft_servers_str$              | mvcombine MSSITE | sort 0 -num(dhcp_utilization)              | eval Free=address_total-dhcp_hosts | rename timestamp as Timestamp, view as "Network view", address as Network, cidr as CIDR, MSSITE as "AD Site", dhcp_utilization as "DHCPv4 Utilization %", ranges as Ranges, address_total as Provisioned, dhcp_hosts as Used, static_hosts as Static, dynamic_hosts as Dynamic | table Timestamp, "Network view", Network, CIDR, "AD Site", "DHCPv4 Utilization %", Ranges, Provisioned, Used, Static, Dynamic</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="count">10</option>
        <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">all</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="drilldown">none</option>
      </table>
    </panel>
  </row>
</form>
Showing results for 
Search instead for 
Do you mean 

Recommended for You