Reply
Accepted Solution

Report unused Ports

hoppem
Techie
Posts: 12
3558     1

Hello,

 

how can i create a report. - NetMRI 7.1.3 - Reports - Report Gallery - Add Custom Report -

 

I will make a list which switch and ports not used in 60 or 120 or 240 days.

 

A list:

- Switch Name - Port - Port Alias - Days not used -

 

 Is that feasible ? And how ?

 

Regards

Martin

Re: Report unused Ports

Adviser
Posts: 418
3558     1

Here is a start, save the file as:

Ports Used in past 30 Days.xml

Then import it into NetMRI reports

<?xml version="1.0" encoding="UTF-8"?>
<report>
  <category-id type="integer">1</category-id>
  <description></description>
  <hidden-ind type="boolean">false</hidden-ind>
  <name>Ports Used in past 30 Days</name>
  <pre-packaged-ind type="boolean">false</pre-packaged-ind>
  <short-headings-ind type="boolean">false</short-headings-ind>
  <report-sets type="array">
    <report-set>
      <description></description>
      <logic-text>5 and 6 and 7</logic-text>
      <logic-type>and</logic-type>
      <model-doc-id type="integer">10</model-doc-id>
      <name>Ports Used in past 30 Days</name>
      <report-set-attributes type="array">
        <report-set-attribute>
          <attribute-doc-id type="integer">2510</attribute-doc-id>
          <is-display-column type="boolean">true</is-display-column>
          <path>device.DeviceName</path>
          <position type="integer">0</position>
          <sort-direction nil="true"></sort-direction>
        </report-set-attribute>
        <report-set-attribute>
          <attribute-doc-id type="integer">2510</attribute-doc-id>
          <is-display-column type="boolean">false</is-display-column>
          <path>device.DeviceName</path>
          <position type="integer">0</position>
          <sort-direction>ASC</sort-direction>
        </report-set-attribute>
        <report-set-attribute>
          <attribute-doc-id type="integer">2508</attribute-doc-id>
          <is-display-column type="boolean">true</is-display-column>
          <path>device.DeviceIPDotted</path>
          <position type="integer">1</position>
          <sort-direction nil="true"></sort-direction>
        </report-set-attribute>
        <report-set-attribute>
          <attribute-doc-id type="integer">877</attribute-doc-id>
          <is-display-column type="boolean">false</is-display-column>
          <path>ifDescrRaw</path>
          <position type="integer">1</position>
          <sort-direction>ASC</sort-direction>
        </report-set-attribute>
        <report-set-attribute>
          <attribute-doc-id type="integer">877</attribute-doc-id>
          <is-display-column type="boolean">true</is-display-column>
          <path>ifDescrRaw</path>
          <position type="integer">2</position>
          <sort-direction nil="true"></sort-direction>
        </report-set-attribute>
        <report-set-attribute>
          <attribute-doc-id type="integer">202</attribute-doc-id>
          <is-display-column type="boolean">true</is-display-column>
          <path>ifDescr</path>
          <position type="integer">3</position>
          <sort-direction nil="true"></sort-direction>
        </report-set-attribute>
        <report-set-attribute>
          <attribute-doc-id type="integer">206</attribute-doc-id>
          <is-display-column type="boolean">true</is-display-column>
          <path>ifLastChange</path>
          <position type="integer">4</position>
          <sort-direction nil="true"></sort-direction>
        </report-set-attribute>
      </report-set-attributes>
      <report-set-filters type="array">
        <report-set-filter>
          <attribute-doc-id type="integer">206</attribute-doc-id>
          <match>30 days ago</match>
          <operator>&gt;=</operator>
          <path>ifLastChange</path>
          <position type="integer">5</position>
        </report-set-filter>
        <report-set-filter>
          <attribute-doc-id type="integer">197</attribute-doc-id>
          <match>up</match>
          <operator>matches</operator>
          <path>ifAdminStatus</path>
          <position type="integer">6</position>
        </report-set-filter>
        <report-set-filter>
          <attribute-doc-id type="integer">214</attribute-doc-id>
          <match>up</match>
          <operator>matches</operator>
          <path>ifOperStatus</path>
          <position type="integer">7</position>
        </report-set-filter>
      </report-set-filters>
    </report-set>
  </report-sets>
</report>
Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh
Highlighted

Re: Report unused Ports

Moderator Dave_Signori
Moderator
Posts: 114
3558     1

Here's one that displays ports that have a last oper change date of more than 30 days ago and are currently oper down.  It displays last oper change date, admin status and oper status.  After importing you can edit to change the the number of "days ago".  I recommend importing this into the Switch Port Manager Gallery.

@DaveSignori

Re: Report unused Ports

Expert
Posts: 262
3559     1

Thanks to both Dave and Sif for providing working examples.  I tried doing this a couple days ago without success -- switch ports that I knew met the criteria were not being listed.

 

Since the general area was switch ports, I started with data types in the SPM category, but those didn't offer ifLastChange as a logic choice.  I'm pretty sure I also tried starting with Interfaces but didn't get it to work either.

 

This is another example of why we need some kind of wizard into which we specify the logic conditions and desired columns, and it creates the report or else declares that one or more constraints make it not possible.

 

BTW, when I was reading the doc on how the boolean comparison operators would work on Time data types, I found the "X days ago" option -- very nice!

Showing results for 
Search instead for 
Do you mean 

Recommended for You