2 Replies Latest reply on Apr 21, 2015 9:40 AM by grantallenby

    Report Writer SQL Help

    grantallenby

      Hi All,

       

      Complete SQL Noobie and struggling with writing a report.

       

      I need a report to display all nodes from the "Example"* comments that have not been rebooted in 90 days or greater.

       

      I can create a report using the templates for this however it is restricted to me having to select a date, which is not ideal.

       

      Any ideas?

        • Re: Report Writer SQL Help
          LadaVarga

          Hello,

           

           

          Which version of NPM do you use. From NPM 10.7+ we introduced new reporting.

          1. Click report in web.

          2. Create new report.

          3. Pick Custom table.

          4. Pick Events as things which you need.

          5. Pick eventtype = Node rebooted.

          6. In edit pick what you want.

          7. Configure table.

           

          Be aware in default events are deleted after 30 days. Can be changed in settings of course.

           

          reports-2-2-001173.png

            • Re: Report Writer SQL Help
              grantallenby

              11.5

               

              WIll give this a go

               

              I was using the report writer and managed to get.... However it was giving me all of them.

               

              SELECT

              1. Nodes.Caption AS NodeName, Nodes.LastBoot AS Last_Boot, DATEDIFF(day, Nodes.LastBoot, getdate()) AS no_of_days

              FROM

              Nodes

              WHERE 

              (

              (Nodes.Comments LIKE '%Plymouth%')

              )

               

              ORDER BY 2 DESC