1 Reply Latest reply on Mar 24, 2014 1:44 PM by 8clover

    Help with Custom Report

    robdover

      I am trying to come up with a report that will return the number of unused interfaces on my network switches. I have managed to get a report that gives me all interfaces but I am at a loss as to how to only count the interfaces that are in a Admin Down state.

      Ideally this would return both the Count of interfaces that are Admin Down as well as a percentage if possible.

      Any suggestions welcome.

       

      Thanks

        • Re: Help with Custom Report
          8clover

          The below query, while not pretty, will give you the number of interfaces that are admindown, total interfaces and percent that are admindown.  You should be able to plug this in to an Advanced SQL report

           

          select (select count(*) from interfaces where adminstatus = 0) as [Count],
          count(*) as [Total],
          (select count(*) from interfaces where adminstatus = 0)*100/count(*) as [Percent] 
          from interfaces