Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Exporting the list of nodes

Exporting the list of nodes

Scheduled Pinned Locked Moved Support
6 Posts 3 Posters 47.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J
    J
    jeanb.lott
    wrote on last edited by
    #1

    Hi,

    I would be interested in exporting the list of nodes of my system along with some of the parameters such as IP configuration (Address, Mask, Gateway) from the database into an excel file for example. It's in order to verify the list of nodes and put all this configuration in a document, is there any functionality to do this?

    Thanks,

    1 Reply Last reply
    0
    • A
      A
      Alex Kirhenshtein
      wrote on last edited by
      #2

      Hello

      You can use following SQL query: SELECT i.ip_addr,i.ip_netmask,op.name FROM interfaces AS i,object_properties AS op WHERE i.node_id=op.object_id AND i.ip_addr NOT IN ('0.0.0.0', '127.0.0.1') ORDER BY i.node_id,i.ip_addr

      If you use PostgreSQL, you can do it by using \copy command in psql shell: \copy (SELECT i.ip_addr,i.ip_netmask,op.name FROM interfaces AS i,object_properties AS op WHERE i.node_id=op.object_id AND i.ip_addr NOT IN ('0.0.0.0', '127.0.0.1') ORDER BY i.node_id,i.ip_addr) TO '/tmp/nodes.csv' CSV HEADER

      1 Reply Last reply
      0
      • J
        J
        jeanb.lott
        wrote on last edited by
        #3

        That worked great, thanks,

        1 Reply Last reply
        0
        • Y
          Y
          yshiro
          wrote on last edited by
          #4

          It´s possible to make the same question, with scripting ?

          I´m trying to make an script, for free ports on my switches.

          SELECT op.name,COUNT(i.if_type) AS FreePorts
          FROM interfaces i, object_properties op
          WHERE i.if_type=6
          AND i.node_id=op.object_id
          AND i.oper_state='2'
          GROUP BY op.name
          

          Greetings

          1 Reply Last reply
          0
          • A
            A
            Alex Kirhenshtein
            wrote on last edited by
            #5

            Sure. I've put sample script here: http://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations#List_free.28administratively_down.29_ethernet_ports_on_switches

            @yshiro said in Exporting the list of nodes:

            It´s possible to make the same question, with scripting ?

            I´m trying to make an script, for free ports on my switches.

            1 Reply Last reply
            0
            • Y
              Y
              yshiro
              wrote on last edited by
              #6

              Thanks Alex!
              Now i´ll try to implement your script.
              Greetings

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups